Advertisement
Guest User

Untitled

a guest
May 4th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.70 KB | None | 0 0
  1. <?php
  2.   function drawRegistrationForm($errors = array()) {
  3.     ?>
  4.         <h1>New User Registration</h1>
  5.         <h3>Once registered, you must confirm your email address. All fields are required.</h3>
  6.         <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=register&cmd=register" enctype="multipart/form-data">
  7.         <fieldset>
  8.           <?php echo hidden(); ?>
  9.           <p class="left">
  10.             <label for="firstname">First Name:</label>
  11.             <input type="text" name="firstname" id="firstname" value="<?php echo isset($_POST['firstname']) ? format($_POST['firstname']) : ""; ?>" /> <?php echo jqHelp("Enter your first name here."); ?>
  12.           </p>
  13.           <?php if(@$errors['firstname']) { ?><p class="error">Please enter your first name</p><?php } ?>
  14.  
  15.           <p class="right">
  16.             <label for="lastname">Last Name:</label>
  17.             <input type="text" name="lastname" id="lastname" value="<?php echo isset($_POST['lastname']) ? format($_POST['lastname']) : ""; ?>" /> <?php echo jqHelp("Enter your last name here."); ?>
  18.           </p>
  19.           <?php if(@$errors['lastname']) { ?><p class="error">Please enter your last name</p><?php } ?>
  20.  
  21.           <p class="left">
  22.             <label for="username">Username:</label>
  23.             <input type="text" name="username" id="username" value="<?php echo isset($_POST['username']) ? format($_POST['username']) : ""; ?>" /> <?php echo jqHelp("Enter your username here.<br /><br /><strong>Note:</strong> Not case-sensitive"); ?>
  24.           </p>
  25.           <?php if(@$errors['username']) { ?><p class="error">Please enter your username</p><?php } ?>
  26.  
  27.           <p class="right">
  28.             <label for="email">Email:</label>
  29.             <input type="text" name="email" id="email" value="<?php echo isset($_POST['email']) ? format($_POST['email']) : ""; ?>" /> <?php echo jqHelp("Enter your email address here."); ?>
  30.           </p>
  31.           <?php if(@$errors['email']) { ?><p class="error">Please enter a valid email</p><?php } ?>
  32.  
  33.           <p class="left">
  34.             <label for="password">Password:</label>
  35.             <input type="password" name="password" id="password" value="<?php echo isset($_POST['password']) ? format($_POST['password']) : ""; ?>" /> <?php echo jqHelp("Enter your password here.<br /><br /><strong>Note:</strong> Passwords are CaSe-sEnSiTiVe!"); ?>
  36.           </p>
  37.           <?php if(@$errors['password']) { ?><p class="error">Please enter your password</p><?php } ?>
  38.  
  39.           <p class="right">
  40.             <label for="confirm">Confirm:</label>
  41.             <input type="password" name="confirm" id="confirm" value="<?php echo isset($_POST['confirm']) ? format($_POST['confirm']) : ""; ?>" /> <?php echo jqHelp("Confirm your password here.<br /><br /><strong>Note:</strong> Passwords are CaSe-sEnSiTiVe!"); ?>
  42.           </p>
  43.           <?php if(@$errors['confirm'] == 1) { ?><p class="error">Please confirm your password</p><?php } elseif(@$errors['confirm'] == 2) { ?><p class="error">Your passwords do not match</p><?php } ?>
  44.  
  45.           <p class="left">
  46.             <label for="phone">Phone:</label>
  47.             <input type="text" name="phone" id="phone" value="<?php echo isset($_POST['phone']) ? format($_POST['phone']) : ""; ?>" /> <?php echo jqHelp("Enter your primary phone number here."); ?>
  48.           </p>
  49.           <?php if(@$errors['phone']) { ?><p class="error">Please enter your phone</p><?php } ?>
  50.  
  51.           <p class="right">
  52.             <label for="site">Site:</label>
  53.             <input type="text" name="site" id="site" value="<?php echo isset($_POST['site']) ? format($_POST['site']) : ""; ?>" /> <?php echo jqHelp("Enter your site address here."); ?>
  54.           </p>
  55.           <?php if(@$errors['site']) { ?><p class="error">Please enter your site url</p><?php } ?>
  56.  
  57.           <p class="left">
  58.             <label for="captcha">Captcha:</label>
  59.             <input type="text" name="captcha" id="captcha" value="" /> <?php echo jqHelp("Enter the captcha code seen below.<br /><br /><strong>Note:</strong> Click the captcha code for a new captcha."); ?>
  60.           </p>
  61.  
  62.           <p class="right">
  63.             <label for="captcha">&nbsp;</label>
  64.             <img src="captcha.php" alt="Captcha" title="Captcha" class="captcha" width="205" height="35" /> <?php echo jqHelp("Enter this captcha code above.<br /><br /><strong>Note:</strong> Click the captcha code for a new captcha."); ?>
  65.           </p>
  66.           <?php if(@$errors['captcha']) { ?><p class="error">Invalid Captcha code</p><?php } ?>
  67.  
  68.           <p class="left">
  69.             <label for="captcha">&nbsp;</label>
  70.             <input type="submit" value="Register" class="submit" />
  71.           </p>
  72.         </fieldset>
  73.         </form>
  74.     <?php
  75.   }
  76. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement