Jump to content

Pikachu2000

Staff Alumni
  • Posts

    11,377
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Pikachu2000

  1. <option name='multiply'>*</option> // Change this <option value='multiply'>*</option> // To this
  2. I haven't tested this, but change FROM_UNIXTIME to DATE_FORMAT and give it a try.
  3. You're attempting to insert a duplicate value into a table field that is a unique indexed field. Just like the error says. A login script shouldn't need an INSERT query at all (in general).
  4. Yes, it can be done. You're going to need to provide a lot more info for anyone to help you with the how part of it, though.
  5. You have an extra concatenation operator ( . ) after $decrypted_username, before the closing parenthesis. scandir("/oauth/files/".$decrypted_username.);
  6. There's an extra closing curly brace on line 18.
  7. It's most likely something that doesn't work from one PHP version to another. You'll need to post the code, the PHP version you developed the site on, and the PHP version the web server is running before anyone here will really be able to help.
  8. It must have been a PEBCAK error . . .
  9. It looks fine to me. What is the problem?
  10. Change the quotes around $timestamp from single to double quotes.
  11. What do you mean by "correct it"? What problems are you having with it?
  12. After the INSERT queryin the first script, you can call mysql_insert_id(), and store its value in a hidden field or $_SESSION var for use in the next script.
  13. You'd need to change the comparison operator from greater than to less than for the previous record.
  14. $query = "SELECT * FROM submissions WHERE id>'$curid' ORDER BY id DESC limit 1"; $next = mysql_query($query) or die( '<br />Query string ' . $query . '<br />Produced error: ' . mysql_error() . '<br />');
  15. Unfortunately, it still shows up in some current books and tutorials, even though it shouldn't . . .
  16. No, I mean remove $_SERVER['PHP_SELF'] from the <form tag and leave everything else.
  17. Sort of unrelated, but change the form's action to action="" if you're submitting it to itself. Using $_SERVER['PHP_SELF'] is an XSS risk.
  18. Is there a particular reason you need to do it this way? Most browsers limit the number of characters that can be used in a GET query string, so you'd be better off using the POST method.
  19. Nobody will likely be able to help you without seeing the relevant code, and database structure (if applicable).
  20. Start by copy/pasting the query into phpMyAdmin and seeing if it runs successfully that way.
  21. $new_score = ($score + $old_score); AND $new_played = ($old_played + 1); // at least that's what it looks like you're trying to do . . .
  22. Missed it last night, but string type data needs to be enclosed in quotes in the query string. Table and field names should be enclosed in backticks, and although it isn't necessarily required, it can save you headaches in the future. $query = "INSERT INTO `mailinglist` (`First`, `Last`, `Email`, `How_Found`) VALUES ('$firstname', '$lastname', '$email', '$howfound')";
  23. It would have to be an HTML formatted email, not a plain text email, then you can simply use the regular <img> tags for the image.
  24. What do you mean? These two things don't really go together . . . Unless you're actually talking about sending a multipart email.
×
×
  • 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.