Jump to content

jcbones

Staff Alumni
  • Posts

    2,653
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by jcbones

  1. It is a matter of opinion, and what you are most comfortable with. If this is a one time thing, or a website that has a small potential for growth, and I didn't have a large class library at my disposal, I would go the traditional (procedural) way, or go with a specific MVC library like cakePHP.
  2. This is why I 'DEFINE' my all of my configuration variables (constants).
  3. Personally, I find Barand's post clear, concise, informative, intelligent, and down right helpful...
  4. You have either: 1. spelling error in your column names. 2. spelling error in your variable name.
  5. That was an example, and he even posted the example function, although commented out. If that is a direct copy/paste you are doing, it will not work.
  6. Post the structure of your database table you are extracting from.
  7. We can't either, without any code. For we are not sitting there looking over your shoulder. So, if you want any help, you will have to post the code you are looking at.
  8. Put all of your HTML together, and all of your PHP Processing together. You should only have "echo'd" PHP inside the HTML, this will help with de-bugging. We call it: separation of logic and output. Which is why most of us use some sort of template system. Other than that, I have never been a fan of that style of pagination. I think it is wasteful use of resources, and on huge tables, it would be much slower than a 'count' query feeding a limited query. Small tables, I think it would be equally as fast.
  9. You could benchmark it, and find the answer pretty quick. IIRC, foreach was slightly faster in the few test that I ran.
  10. LOL, that's funny. Implementation means a lot. A link would go a LONG way here.
  11. I like the layout, and only noticed a couple of things. 1. Under "My Goals" on the main page, you mis-spelled "came" by leaving off the 'e'. Unless you actually cam across a computer. 2. When you navigate to "Billing", you should probably prompt for a password before you get to the page. Currently a user can see all of the links, but cannot use a link without logging in. I would lock that page down.
  12. Being that the code provided is a processing script, and not an output script, this code cannot be "put" in there. You will have to find the right functions to pass it to the template, and I'm not a smarty guy. I am assuming that you could put it straight into the template itself, but that would be a straight out guess.
  13. Are you getting the correct comic id's on your links?
  14. Does the email address in the $SendEmail variable reside on their mail server? Most host will not send the mail if you do not use a valid email address that is on their server.
  15. I have no Idea what the question is: Are you looking for variable variables, list(), implode(), extract(), ???
  16. Well, There is only one EST zone, one PST zone, one CST zone, and one MST zone. So I would say you could pick any single one in the different categories, and you would get the correct time.
  17. Have you run the query in a database software like phpMyAdmin, or in the MySQL console? Have you checked the "view source" of the page?
  18. You should also change: Line 77: while($file = $d->read()) To: while(false !== ($file = $d->read()))
  19. Pretty sure (by your OP query) that you should be joining players table to player_stats, not players_killed, table.
  20. Stoty, I'll explain. Your code must be amended to: $result = mysql_query("SELECT * FROM tblCookbook where id='$frmID'"); while($row = mysql_fetch_array($result)) { print "<pre>" . print_r($row,true) . "</pre>"; //true (boolean) must be added as a second parameter to the print_r() function. Else it will error out, which would be a blank page if display errors is turned off. } ?> Which leads to another de-bugging feature. Add these two lines to the VERY top of your script, right under <?php error_reporting(-1); //report all errors. ini_set('display_errors',1); //display reported errors on the screen.
  21. I like to use the DateTime object, not sure if it changes these problems though. <?php $date = new DateTime(); $date->sub(new DateInterval('P28D')); echo 'The correct way to do it is: ' . $date->format('Y-m-d');
  22. What changed? In the 'entire code' the class declaration is on line 1309 and ends on 1438 (not 1310 to 1441), and it isn't nested.
  23. $move = 1; if(move_uploaded_file($tmp,$move++)) {
  24. What about a simple id column that is auto incremented, that would be truly unique.
  25. I do use it from time to time, but never for $_POST or $_GET. So I'm with Barand on this one.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.