Forms cannot be nested, there can be no form within form. Simply use 4 fields - username, oldpassw, newpassw, newpassw2 (must be equal newpassw), when the form is submited, check if username and oldpassw are valid, newpassw = newpassw2, and if everything is right, you can update to the new password

Edward Peloke wrote:

I am creating a form to allow the user to change his/her password. After
the user enters their username and old password, I need to verify that info
before they can change their user name and password. So I tried using a
form within a form but am having some problems with passing the parameters
back and forth...any new ideas would be greatly appreciated. I will fill in
all the db stuff later.

Thanks,
Eddie




<FORM name="bidsubmit" action="allan.php" method=post>
<TABLE align=center border=1>
<TBODY>
<TR>
<TD>
UserName:
</TD>
<TD vAlign=center>
<DIV align=left>
<INPUT maxLength=25 size=25 name=uname value='<?
print $HTTP_POST_VARS['uname']; ?>'> </B></FONT>
</DIV>
</TD>
<TD></TD>
</TR>
<TR>
<TD>
Password:
</TD>
<TD vAlign=center>
<DIV align=left>
<INPUT type='password' maxLength=25 size=25 name=pword>
</B></FONT>
</DIV>
</TD>
<TD><FORM name="verify" action="allan.php" method=post>
<input type=hidden name='uname' value='uname'>
<? $pword=crypt('$pword'); ?>
<input type=hidden name='pword' value=''>
<INPUT type=submit value=Verify name=verify>
</td>
</TD>
</TR>
<TR>
<TD>
New Password:
</TD>
<TD vAlign=center>
<DIV align=left>
<INPUT maxLength=25 size=25 name=npword type=password>
</B></FONT>
</DIV>
</TD>
<TD></TD>
</TR>
<TR>
<TD>
Verify Password:
</TD>
<TD vAlign=center>
<DIV align=left>
<INPUT maxLength=25 size=25 name=vnpword type=password>
</B></FONT>
</DIV>
</TD>
<TD></TD>
</TR>


<TR >
<td>
<INPUT type=submit value=Submit name=bidsubmit>
</TD>
<TD width='39%'>
<DIV align=center><B><INPUT type=reset value=Reset
name=reset>
</B></DIV></TD></TR></TBODY></TABLE>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to