2 Replies Latest reply on Feb 9, 2007 12:13 PM by Brenton07

    Problem with php/mysql

    Brenton07 Level 1
      I am working on a simple registration form for my website. I have successfully completed the registration and login, and am putting the finishing touches on a script that allows them to change their password. I've gotten the script to give me error messages if the username and old passwords don't match, or if they can't find the username in the database. I also have gotten it to tell me the change was successful, but when I check the database, the new password has not been inserted. My AS is first, then my php... this is the area I'm having trouble...
        • 1. Re: Problem with php/mysql
          Jan-Paul K. Level 1
          to me the insert statement looks quite buggy.
          You want to insert a password only without username? does that make sense?
          I suggest you put some debug output into your php and use the mysql_error function from php to detect if there is an error in your statement.

          • 2. Re: Problem with php/mysql
            Brenton07 Level 1
            You were right, it was the insert statement. It should be "UPDATE" since there is already a variable being held since the account already exists. I only wish I would have seen your comment first, because you were also right about inserting the password without the username; luckily I'm only testing, so there was no problem when that code ended up changing the passwords of every single data entry I made!