Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. No, he doesn't need to do that. He just needs to take $sql out of the function and change his logic a bit.
  2. You have your $sql variable in a function and it never gets to: $result = mysql_query($sql); Not sure why you have it in a function when if($num_rows == 1){ is true then the username exists with a matching password.
  3. It's better to use the function I gave you because it uses a variety of data type check to see what's what. Because you actually want a string that only has digits in it, or an (int) data type.
  4. As you've probably already noticed a technique here is to use CAPTCHA for the first 10 posts of a user. Pretty annoying huh?
  5. Yes, it's pretty self explanatory. ORDER BY date DESC LIMIT 1 = order by date(column) in descending order only grab 1 record. So did I, that's why I first thought it was ASC but then realized he meant "most recent".
  6. I don't understand the problem or what there is to fix. You deleted everything from the table and the query takes 0.0s to return an empty set. Isn't that what you expected?
  7. if(!is_int_val($_POST[height)) { // If it IS NOT an integer } else { // If it IS an integer }
  8. You could create a hash from their username and make them enter it somewhere to verify they're human. Send it via mass email. Do you have an email activation set up?
  9. You're going to have to check multiple things. Use this function: function is_int_val($data) { if (is_int($data) === true) return true; elseif (is_string($data) === true && is_numeric($data) === true) { return (strpos($data, '.') === false); } return false; }
  10. No, that would list the data from past to present. Yes, exactly. The first row after it's been ordered by descending date. @OP. you mean the most recent entry, correct? Than the query you have is correct, something else is wrong.
  11. That looks correct. What type is date?
  12. How are you using is_numeric? This returns true for me. if(is_numeric(0.0)) { echo "true"; } else { echo "false"; } ?>
  13. You're still new here, don't worry about it. It just makes the code easier to read by formatting and highlighting code properly. If everything properly works now, please mark as [sOLVED].
  14. Please use tags around code. You never mentioned it was in a query... Try: echo "insert into log job_number=$job_number, user=$theid, item_checked=$key, item_comment='{$_POST['C_'.$var]}'";
  15. What do you mean "include"?
  16. Please read this: http://dev.mysql.com/doc/refman/5.0/en/delete.html Also, please state exactly it is you're trying to do, then we can show you the proper most efficient way to accomplish it.
  17. Please read previous posts, mandred provided you with the exact answer... $_POST['C_' . $var];
  18. Wow, you're right, this is very important. So very important, I just wasted 5 minutes skimming through a conversion that consisted of zombies and pugs. Maybe they'll be a zombie pug, wouldn't that be the cutest little thing.
  19. You're missing single quotes.
  20. Use a dot, just like any other string.
  21. Hmm... I still fail to see a question.
  22. Hrmmm, are you sure?!
  23. When you look at "right click >> view source" what does it say for that td class? Try: '>
  24. how the hell did you become a Moderator - so darn rude It's not being rude, everyone can agree on that. It's an opinion, same opinion you had coming here and demanding us to build a site for you. Now scurry on little troll and find some tutorials on Google or examples on phpfreaks from other similar posts, which I doubt you have already done.
  25. Ok, and what's your question...? P.S. - Use tags around code.
×
×
  • 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.