stelthius Posted July 15, 2009 Share Posted July 15, 2009 Alright guys im back again, sorry! for some reason my form isnt updating the DB but it is printing out done as it normally would do once updating the DB any suggestions or ideas guys ? $newpass = $_POST['forcednewpass']; } if($_POST['form'] == "userid"){ $userid = $_POST['userid']; $password = md5($newpass); mysql_query("UPDATE users SET password='$password', flag='0' WHERE username='$userid'") or die(mysql_error()); print"done"; } Quote Link to comment Share on other sites More sharing options...
ronnie88 Posted July 15, 2009 Share Posted July 15, 2009 try not using this: if($_POST['form'] == "userid"){ and see what happens. Quote Link to comment Share on other sites More sharing options...
Noumes Posted July 15, 2009 Share Posted July 15, 2009 could you do something like if(isset($_POST['submit'])) { $userid = $_POST['userid']; $password = md5($newpass); mysql_query("UPDATE users SET password='$password', flag='0' WHERE username='$userid'") or die(mysql_error()); print"done"; } Quote Link to comment Share on other sites More sharing options...
stelthius Posted July 15, 2009 Author Share Posted July 15, 2009 Alright after some fiddling im still not getting it to work here is my code... $query="SELECT username FROM vs_users WHERE password = '$new_pass'"; $newpass = $_POST['forcednewpass']; $newpassconf = $_POST['forcednewpass1']; if(!$newpass == $newpassconf){ printf("<script>location.href='login.php?op=nopwmatch'</script>"); } if($_POST['form'] == "userid"){ $userid = $_POST['userid']; $password = md5($newpass); mysql_query("UPDATE vs_users SET password='$password', flag='0' WHERE username='$userid'") or die(mysql_error()); printf("<script>location.href='login.php'</script>"); } } Any help is appretiated i think im just missing something simple! 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.