Hi everyone... I was working on a user system and i have gotten the registration and login systems to work fine (using PHP and MySQL Database).
But when I am attempting to make a Change Password handler, it keeps failing to do so.
This is what I have:
// Create query
$q1 = "SELECT * FROM `users` "
."WHERE `id`='".$_SESSION["valid_id"]."' ";
$result = mysql_query($q1) or die(mysql_error());
$row = mysql_fetch_array($result);
$new_pass = "UPDATE `users`"
$resulta = mysql_query($new_pass) or die(mysql_error());
*Extracted from larger script.
Please keep in mind that they your must already be logged in, that's why it is getting "valid_user" and "valid_id" from the session.
also my database has bultiple tables, but the table that contains the content needed is called "users" and within it, there are fields called: "id" "username" password" and "email".
All i want it to do is to replace the old password with the new password that the user has provided.