Foser Posted July 6, 2007 Share Posted July 6, 2007 if (isset($_POST['submit'])) { if (isset($_POST['username_check'])){ mysql_query("UPDATE user_info SET username = {$_POST[username]} WHERE username = {$username}"); }} for some reason it does not update. the statement gets passed but it never updates. I have put in an echo in each if statement to test if they get passed and they do. they just dont update. Quote Link to comment Share on other sites More sharing options...
Harley1979 Posted July 6, 2007 Share Posted July 6, 2007 Try: if (isset($_POST['submit'])) { if (isset($_POST['username_check'])){ mysql_query("UPDATE user_info SET username = '$_POST[username]' WHERE username = '$username'"); }} Quote Link to comment Share on other sites More sharing options...
MemphiS Posted July 6, 2007 Share Posted July 6, 2007 if (isset($_POST['submit'])) { if (isset($_POST['username_check'])){ mysql_query("UPDATE user_info SET username = '".$_POST['username']."' WHERE username = '$username'"); } } Should work.. Quote Link to comment 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.