Jump to content

Update Database Using Php Form


fazlionline

Recommended Posts

hi i want to update the user informationthe user has given his name , emial and passnow i want to update his name and email from the form IF the passward in the form match the passward in the database.can any one tall me how to write this codeThanks

Link to comment
Share on other sites

//...$name = mysql_real_escape_string($_POST['name']);$email = mysql_real_escape_string($_POST['email']);$password = mysql_real_escape_string($_POST['password']);mysql_query("UPDATE users SET name = '$name', email = '$email' WHERE password = '$password'");//...

By the way you should hash the passwords in the database so that the database content is less sensitive.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...