hi this is my code.
I want to validate new password with repeat password befor user press submit.
<p align="center">To reset your password, provide your current password</p>
<form id="form1" name="form1" method="post" action="pcq.php">
<table border="0" align="center" class="mytable2" style="margin-left:175px" >
<tr>
<td>Current Password</td>
<td>
<input type="password" name="oldpass" style="width:150px;" />
</td>
</tr>
<tr>
<? $user=$_SESSION[myusername] ?>
<td><input type="hidden" name="usr" id="usr" value="<?php echo $user; ?>"style=" width:150px;" />
</td>
</tr>
<tr>
<td>New Password</td>
<td><input type="password" name="pass" style="width:150px;" /></td>
</tr>
<tr>
<td>Repeat New Password</td>
<td><input type="password" name="rpass" style="width:150px;" /></td>
</tr>
<tr>
<tr>
<td>
</td>
<td > <input type="submit" value="submit" >
<input type="reset" value="Reset"></td>
</tr>
</table>
</form>