VTEC IS UR BEST FRIEND Posted April 20, 2009 Share Posted April 20, 2009 Guys, I am wondering how I can do something similar on phpfreaks registration page. On my form I want to make it so when I create my account the passwords in the 2 boxs match. So the caution box shows until I enter the 2 same and a green check box displays. Take a look at this link and enter ur password into these 2 fields http://www.phpfreaks.com/forums/index.php?action=register This is my form <td colspan="2" align="right"><center>SupportNet Sign-up Form</center></td> <form name="content_form" action="#" method="post" onSubmit="return validateForm()"> <input type="text" size="10" style="visibility:hidden;" id="isChecked" name="isChecked" value="No"> <div align="center"> <table> <tr> <td colspan="3"><?=$MESSAGES_ARRAY[$msg]?></td> </tr> <tr> <td class="inner" align="left"><b>Username<font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="username" id="username" size="50" value="<?=$username?>" maxlength="10"> Max 10 characters <div id="username_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Password<font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="password" name="password" size="50" value="<?=$password?>" maxlength="10"> Max 10 characters <div id="password_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Confirm Password<font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="password" name="conf_pwd" size="50" value="<?=$password?>" maxlength="10"> <div id="confirm_pwd_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>First Name <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="firstname" size="50" value="<?=$firstname?>"> <div id="firstname_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Last Name <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="lastname" size="50" value="<?=$lastname?>"> <div id="lastname_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Email <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="email" id="email" size="50" value="<?=$email?>" onChange="resetisChecked()"> <input type="hidden" id="isExist" value="0"> <div id="email_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Tag ID <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="tagid" size="50" value="<?=$tagid?>"> <div id="tagid_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Company Name <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="company_name" size="50" value="<?=$company_name?>"> <div id="company_name_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Street Address <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="street_address" size="50" value="<?=$street_address?>"> <div id="street_address_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>City <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="city" size="50" value="<?=$city?>"> <div id="city_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>State <font color="red">*</font></b></td> <td class="inner" align="left"> <b>:</b> <select size="1" name="state" id="state"> <? if($state!="") echo "<option value='".$state."' selected >".$state."</option>"; else echo "<option value='' selected >--select--</option>"; ?> <option value="AK">Alaska</option> </select> <div id="state_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Zip Code <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="zip_code" size="50" value="<?=$zip_code?>"> <div id="zip_code_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Work Phone <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="work_phone" size="50" value="<?=$work_phone?>"> <div id="work_phone_div"></div> </td> </tr> <tr> <td class="inner" align="left"><b>Cell Phone <font color="red">*</font></b></td> <td class="inner" align="left"><b>:</b> <input class="textbox" type="text" name="cell_phone" size="50" value="<?=$cell_phone?>"> <div id="cell_phone_div"></div> </td> </tr> <tr> <td class="inner" align="left"><br><br><b>Security Image</b></td> <td class="inner" align="left"><br><br><b>:</b> <img src="admin/securimage/securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>"> <a href="javascript:document.content_form.submit()">Refresh Image</a> <br><br> <input class="textbox" type="text" name="code" size="50"> <div id="code_div"></div> </td> </tr> <tr> <td colspan="2"><br><center><input class="textbox" type="submit" name="sign_up" value="Sign up"> <input class="textbox" name="clear_form" type="button" value="Clear Form" onclick="clearForm()"></center></td> </tr> </table> </div> </form> Link to comment https://forums.phpfreaks.com/topic/154883-password-validation-using-php-form/ Share on other sites More sharing options...
mrMarcus Posted April 20, 2009 Share Posted April 20, 2009 you'll need javascript for that .. look into Mootools or jQuery. Link to comment https://forums.phpfreaks.com/topic/154883-password-validation-using-php-form/#findComment-814635 Share on other sites More sharing options...
soak Posted April 20, 2009 Share Posted April 20, 2009 I've had good results with: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ Link to comment https://forums.phpfreaks.com/topic/154883-password-validation-using-php-form/#findComment-814707 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.