I need to create a change password page. If someone wishes to change their password, all they need to do is enter their username, current password, new password, and confirm new password. If the username and current password matches the database, and the new password fields match, it updates the password field with the new password.
I have a form created that I wish to use. I have included my SQL table structure as well. If you could look these over and help me in any way, I would appreciate it! Thanks!
FORM
================
<form name="form1" method="post" action="">
<table width="100%">
<tr valign="top">
<td width="12%" height="21" valign="middle"> <div align="right"><font color="#000000" size="-2" face="Arial, Helvetica, sans-serif"><img src="
http://10.9.39.232/dialer/graphics/logo.JPG" width="14" height="14" align="absbottom"></font>&
nbsp;</div
></td>
<td width="37%" valign="bottom"> <div align="left"></div></td>
<td width="51%" rowspan="7"><p><font size="-2" face="Arial, Helvetica, sans-serif">If
you would like to change your password, please enter your
username, current password, and new password. Once submitted, if all fields match the database, your password will be changed.</font></p>
<p><font size="-2" face="Arial, Helvetica, sans-serif">If
there are any questions or concerns, please contact the
administrator.</font></p><
/td>
</tr>
<tr valign="top"> </tr>
<tr valign="top">
<td height="21" valign="middle"><div align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Username:</fon
t></div></
td>
<td valign="bottom"><input name="username" type="text" id="username" size="32"></td>
</tr>
<tr valign="top">
<td height="21" valign="middle"><div align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Current
password:</font></div></td
>
<td valign="bottom"><input type="password" id="old_password2" name="current_password" size="32" value="" /></td>
</tr>
<tr valign="top">
<td height="26" valign="middle"> <div align="right"><font size="-2" face="Arial, Helvetica, sans-serif">New
password:</font></div></td
>
<td valign="bottom"><input type="password" id="password" name="password" size="32" value="" /></td>
</tr>
<tr valign="top">
<td height="24" valign="middle"><div align="right"><font size="-2" face="Arial, Helvetica, sans-serif">Confirm
new password:</font></div></td
>
<td valign="bottom"><input type="password" id="confirm_password" name="confirm_password" size="32" value="" /></td>
</tr>
<tr valign="top">
<td height="26" colspan="2"><div align="right">
<input type="submit" name="Submit" value="Submit" />
</div></td>
</tr>
</table>
</form>
MySQL TABLE STRUCTURE
==========================
==========
==========
==========
==========
==========
=========
Field Type Null Default Links to Comments MIME
ID int(11) No
Username varchar(255) No
Password varchar(255) No
Temp_pass varchar(55) Yes NULL
Temp_pass_active tinyint(1) No 0
Email varchar(255) No
Active int(11) No 0
Level_access enum('1', '2', '3') No 2
Random_key varchar(32) Yes NULL
Start Free Trial