Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. $companyname needs single quotes.
  2. Can you post an example of a value that you test in which you expect strtotime() to fail and return FALSE? Because if you're using 5.1 or above it should return FALSE on failure, while previous versions still return -1. I tested with this and I get the expected output: "no good" $d = "blahuasldfjlasjfd"; if (strtotime($d) == FALSE){ // no good, enter it again echo "no good"; } else { // we're good, do something echo "good"; } ?>
  3. Probably a LEFT JOIN.
  4. Try comparing them using '==='.
  5. What you're referring to is not what you're trying to ORDER BY. You're outputting $d->totalref but you're ordering by rankpoints, which is it?
  6. What datatype is the rankpoints field?
  7. I don't know of any windows programs, primarily cause I don't use windows, but there are a lot of online load time tests, just Google. Depending on how detailed you want to get, here is a decent one: Website speed and loading test
  8. Read this: http://forums.mysql.com/read.php?10,157804,157806#msg-157806
  9. Maq

    Web Trends

    Hahaha, I see Barack Obama. He's right in between Apple and Microsoft.
  10. Did you get any output for the line I told you to change?
  11. if($messages //allow them to PM, add 1 to DB. } else { //don't allow them to PM } Run a cron job to reset the users messages to 0 every night.
  12. $result1=mysql_query($sql1) or die(mysql_error());
  13. Unless this is going to be a bigger and more elaborate project in the future. Another alternative to parse the XML with PHP is with DOM and XPath. Good luck.
  14. If you really want to test it then you can make a test input field with your function called on it and run SQL Inject Me on it.
  15. Just a guess ??? $username = $_COOKIE['ID_my_site']; $var = rand(1, 10); $sql = "UPDATE users SET number = '$var' WHERE username = '$username'"; echo "QUERY=> " . $sql; mysql_query($sql) or die(mysql_error());
  16. Yes, that tells you that that submit button has been clicked. You now want to have default values for everything else. So you need to see if they are set (have been assigned any values) if they have then keep them the same if not then you need to create a default value.
  17. Maybe... I have no clue what you're trying to accomplish here.
  18. Try: $query1 ="INSERT INTO tbl_form (orderid, fieldName, fieldValue) VALUES ('$p', '$res[size_name]', '{$formItems['val1' . $p]}') ";
  19. Do you mean something like: $var = rand(1, 10); $sql = "SELECT * FROM table WHERE id = '$var'"; mysql_query($sql) or die(mysql_error());
  20. That's because it should die. This line means that the user name exists. I think you want '==0' here. And the else would mean that the username exists, so delete it. if(mysql_num_rows($result) > 0) {
  21. Check if the posts are set, with isset(). If they are keep the value the same, if not assign the variable a default value.
  22. I haven't examined your code but you can run perl from PHP using shell_exec(). shell_exec("./script.pl");
  23. You can definitely get a lot more in when you're at work. I usually do some work, for a half an hour or so, and make a post or two when I need a break. It's also nice because we don't use any PHP at work.
  24. Didn't work as in, didn't show up, there are errors, or doesn't look right?
  25. A blank screen usually means syntax errors without error reporting on. Like 9three mentioned turn on error reporting. You can do this by putting this at the top of your page directly after you <?php tag: ini_set ("display_errors", "1"); error_reporting(E_ALL);
×
×
  • 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.