Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function check_form(RegistrationForm){
- FNAME.innerHTML="1";
- LOGIN.innerHTML="1";
- Phone.innerHTML="";
- FormOK = "true";
- var regexPhNum = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;
- var regexUserName = /^[a-z][\w\.]{6,24}$/i;
- if(regexPhNum.test(RegistrationForm.cnumber.value)==false){
- Phone.innerHTML="Invalid Phone Number";
- FormOK = "false";
- }
- if(RegistrationForm.fname.value == ""){
- FNAME.innerHTML="Invalid Name";
- FormOK = "false";
- }
- if(RegistrationForm.lname.value == ""){
- LNAME.innerHTML="Invalid Name";
- FormOK = "false";
- }
- if(regexUserName.test(RegistrationForm.login.value)==false){
- LOGIN.innerHTML="Invalid UserName";
- FormOK = "false";
- }
- return FormOK;
- }
- </script>
- <form name="Registration" method="POST" onSubmit="return check_form(this)" >
- <div class="textleft">FirstName:</div>
- <div class="textright"><input name="fname" type="text" class="textfield" maxlength="30" value="<?php echo $fname; ?>"/><font color="Red"><span id = "FNAME"></span> </font>
- </div>
- <div class="textleft">LastName:</div>
- <div class="textright"><input name="lname" type="text" class="textfield" maxlength="30" value="<?php echo $lname; ?>"/><font color="Red"><span id = "LNAME"></span> </font>
- </div>
- <div class="textleft">UserName:</div>
- <div class="textright"><input name="login" type="text" class="textfield" maxlength="20" value="<?php echo $login; ?>"/><font color="Red"><?php echo $vlogin; ?> </font><font color="Red"><span id ="LOGIN"></span></font>
- </div>
- <div class="textleft">Password:</div>
- <div class="textright"><input name="password2" type="password" class="textfield" maxlength="80" value="<?php echo $password; ?>"/><font color="Red"><?php echo $vpassword; ?> </font>
- </div>
- <div class="textleft">Retype Password:</div>
- <div class="textright"><input name="cpassword" type="password" class="textfield" maxlength="80" value="<?php echo $cpassword; ?>"/><font color="Red"><?php echo $vcpassword; ?> </font><font color="Red"><?php echo $errorMessage; ?> </font>
- </div>
- <div class="textleft">Address:</div>
- <div class="textright"><input name="address" type="text" class="textfield" maxlength="200" value="<?php echo $address; ?>"/><font color="Red"><?php echo $vaddress; ?> </font>
- </div>
- <div class="textleft">Contact Number:</div>
- <div class="textright"><input name="cnumber" type="text" class="textfield" maxlength="20" size="40" value="<?php echo $cnumber; ?>" /><font color="Red"><span id = "Phone"></span><?php echo $vcnumber; ?> </font>
- <input name="propic" id="dadded" type="hidden" value="upload/p.jpg" /></div>
- <div class="textleft">Email:</div>
- <div class="textright"><input name="email" type="text" class="textfield" maxlength="100" value="<?php echo $email; ?>"><font color="Red"><?php echo $vemail; ?> </font><font color="Red"><?php echo $emailErrorMessage; ?> </font>
- </div>
- <div class="textleft">Gender:</div>
- <div class="textright1">
- <div class="input-container">
- <select name="gender" id="gender" class="textfield1">
- <option></option>
- <option >Female</option>
- <option >Male</option>
- </select><font color="Red"><?php echo $vgender; ?></font><br />
- </div>
- </div>
- <div class="textleft">Birth Day:</div>
- <div class="textright"><input name="month" type="text" class="date"><font color="Red"><?php echo $vbirthday; ?></font></div>
- <div class="input-container">
- <div class="textright">
- <input type="submit" name="Submit" value="Sign Up" class="greenButton1"/> <!--button to submit registration /-->
- </div>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement