darkshad0w Posted May 16, 2011 Share Posted May 16, 2011 Hi, when someone logs in to my page, i have a form displayed with names, address, etc...what i need to do is when i hit the update button for that information to go into the MYSQL table I have created and over write that information if a user updates...so how do i do that? Quote Link to comment https://forums.phpfreaks.com/topic/236571-updating-php-form-into-mysql/ Share on other sites More sharing options...
jakebur01 Posted May 16, 2011 Share Posted May 16, 2011 In your html form, put action="your_page.php". At the top of your page, put something like. if(isset($_POST['name'])) { $name =$_POST['name']; //connect to sql //then //mysql_query("UPDATE name WHERE `user` = '$user'"); } Quote Link to comment https://forums.phpfreaks.com/topic/236571-updating-php-form-into-mysql/#findComment-1216149 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.