Jump to content

[SOLVED] I can't get UPDATE to update the DB!


brainstorm

Recommended Posts

Hi All,

 

Please see the code attached...I can't get this update script to actually update the DB. When I click the "update" link on "myadminaccount.php", it brings me over to "update.php" and displays the info from the DB. However, once I change the info and hit submit, it doesn't update the database! Additonally, I get no error.

 

I know this is just something simple that I'm missing and any help you could offer would be much appreciated!

 

Thanks!

 

Brainstorm

 

[attachment deleted by admin]

Towards the end of your update query, you have an extra comma

 

, user_activated =  '$user_activated', where id = '$id'

 

There should not be a comma before "where".  That's the first issue I see, you should try using mysql_error to output the error message that MySQL is kicking back to you, if that doesn't help, then post the error message back here so that we can see it.

The function is mysql_error(), for more information, go here:

 

http://www.php.net/mysql_error

 

I've got it to work now! Thanks! Apprently I was missing the $_GET variable and then also missing another variable called "amount_due"...As soon as I added them in, it worked perfectly!

 

Thanks again!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.