Jump to content
fazlionline

Update Database Using Php Form

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...