<?php
include 'connection.php';
//add protection if sessions from login are not valid! Remember the redirect (header:location) the sessions are userid and fullname
?>
Create the ability to update a user's password.

This will need be 3 fields...old password, new password and confirm password <!--DONE-->

ALWAYS START WITH THE USER

<?php
if ($_POST['submit']  == 'Reset Password'){

/*
New and confirm should be equal


Old should be in the database and match the userid in the credentials table
use session and remember, password is sha1

if everything checks out....write update statement and execute....
You need an update statement!

this script needs to be session protected.
*/

}
?>



Old should be in the database and match the userid in the credentials table

You need an update statement!

this script needs to be session protected.
*/


<form action ="reset.php" method="post">
Old Password: <input type="password" name="oldpassword"/><br>
New Password: <input type="password" name="newpassword"/><br>
Confirm New Password: <input type="password" name = "confirmnewpassword"/>
<input type="submit" name="submit" value="Reset Password">

</form>