![]() |
Updating rows in a mysql table
Hey I im trying to udpate the rows PassWord, email, Age in my membersys table of my mysql database. With the code im using its only saving the age and nothing else.
Also the the new info is coming from a form using the POST method PHP Code:
|
Is there some particular reason why you are trying to use three queries to do the job of one?
Also since the password and email are text fields and not numbers the values need to be wrapped in quotes. Code:
mysql_query("UPDATE Member SET PassWord='$ui', email='$ei', Age=$ag WHERE UserName='$user'")Also use prepare and bind instead of query so as to keep the data separate from the query. Finally never assign $_POST values directly to fields - you should validate their content first. |
| All times are GMT +1. The time now is 01:26 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.