Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.65 KB | None | 0 0
  1.      <?php
  2.     printf("<form action='updateusers.php?newuser=1' method='POST'>", $uid);
  3.    
  4.     printf("<label>First Name:</label><input type='text' name='firstnm' value='%s'/><br />", $row['firstName']);
  5.     printf("<label>Last Name:</label><input type='text' name='lastnm' value='%s'/><br />", $row['lastName']);
  6.     printf("<label>Username:</label><input type='text' name='usernm' value='%s'/><br />", $row['username']);
  7.     printf("<label>eMail:</label><input type='text' name='email' value='%s'/><br />", $row['eMail']);
  8.    
  9.     //this isn't the most efficient way, because HTML is weird, but it does work well
  10.     switch($row['accessLevel'])
  11.     {
  12.         case 'Admin':
  13.             printf("<label>Access Level:</label>
  14.                 <select name='access'>
  15.                   <option value='Admin' default>Admin</option>
  16.                   <option value='Maintainer'>Maintainer</option>
  17.                   <option value='Advisor'>Advisor</option>
  18.                 </select><br />");
  19.         break;
  20.        
  21.         case 'Maintainer':
  22.             printf("<label>Access Level:</label>
  23.                 <select name='access'>
  24.                   <option value='Admin'>Admin</option>
  25.                   <option value='Maintainer' default>Maintainer</option>
  26.                   <option value='Advisor'>Advisor</option>
  27.                 </select><br />");     
  28.         break;
  29.        
  30.         case 'Advisor':
  31.             printf("<label>Access Level:</label>
  32.                 <select name='access'>
  33.                   <option value='Admin'>Admin</option>
  34.                   <option value='Maintainer'>Maintainer</option>
  35.                   <option value='Advisor' default>Advisor</option>
  36.                 </select><br />");     
  37.         break;
  38.     }
  39.    
  40.    
  41.    
  42.     printf("<label>Password:</label><input type='text' name='pass' value='%s'/><br />", $row['password']);
  43.  
  44.     printf("<input type='submit' value='Create User' />");
  45.  
  46.     printf("</form>");
  47. }
  48.  
  49. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement