Jump to content

Pikachu2000

Staff Alumni
  • Posts

    11,377
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Pikachu2000

  1. Since this --> if ($hash == $dbpass) is the condition in the code above that causes $_SESSION['login'] to be set to TRUE, have you echoed $hash and $dbpass and compared them? If they match when a wrong password is entered, then you need to figure out why. If they don't match, and $_SESSION['login'] is still set to TRUE, you need to figure out why that's happening. That would be where I'd start anyhow.
  2. You'll get a better response if you post the code in the thread, within . . . tags, rather than hope people will download and open random files from the internet.
  3. The code you posted has no parse errors. It must be somewhere else.
  4. When posting code, enclose it within the forum's . . . BBCode tags. Moving thread to PHP Coding Help . . .
  5. Without knowing anything about the specific application or your directory structure, there's no way to give you an accurate answer.
  6. Yes. It was solved about 41/2 years ago, from the looks of it.
  7. If you're asking what it appears you're asking, http://localhost/ or possibly http://localhost:8080/ should be where you browse to the index file.
  8. If you want to display an error to the user, make it a generic "Sorry, your stupid request cratered the database server" type of message, and log the system generated error. Showing the user the system generated message is a bad idea since it usually contains information they wouldn't otherwise have access to, or even need.
  9. I'm not able to make it produce that specific error, but: die( mysql_error() ); not die(mysql_error). I also get an error that indicates too many closing curly braces at the end. Is that the actual code that's giving the error?
  10. You almost had it . . . Use either . . . or . . . tags, or you can highlight the code in the editor box and click the <> button above.
  11. And when you print_r() the $_POST array, what's in it?
  12. There's no reason to run the same query twice in a row. mysql_data_seek.
  13. Not really. The quality of the answer was directly proportional to that of the question.
  14. And get rid of the error suppression @ operators and forget they even exist.
  15. The connection resource is the first parameter passed to the function, and is not optional: mysqli_query
  16. DB/table/field names are never enclosed in quotes (in MySQL, anyhow. Don't know about the rest). If they happen to be a reserved word, the best thing is to rename the entity, the next best thing is to enclose the name in `backticks`.
  17. I must refer you to reply #7 in this very thread.
  18. That code won't even parse. Paste the actual code here within . . . tags.
  19. The mere fact that you recognize it as being content from the database confirms that is is indeed human readable.
  20. The error is usually on a line preceding the line number in the error message. Missing closing quote or something similar.
  21. And what did you see when you print_r()'d the $_POST array? Was the value of the button in it?
×
×
  • 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.