Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- printf("<form action='updateusers.php?newuser=1' method='POST'>", $uid);
- printf("<label>First Name:</label><input type='text' name='firstnm' value='%s'/><br />", $row['firstName']);
- printf("<label>Last Name:</label><input type='text' name='lastnm' value='%s'/><br />", $row['lastName']);
- printf("<label>Username:</label><input type='text' name='usernm' value='%s'/><br />", $row['username']);
- printf("<label>eMail:</label><input type='text' name='email' value='%s'/><br />", $row['eMail']);
- //this isn't the most efficient way, because HTML is weird, but it does work well
- switch($row['accessLevel'])
- {
- case 'Admin':
- printf("<label>Access Level:</label>
- <select name='access'>
- <option value='Admin' default>Admin</option>
- <option value='Maintainer'>Maintainer</option>
- <option value='Advisor'>Advisor</option>
- </select><br />");
- break;
- case 'Maintainer':
- printf("<label>Access Level:</label>
- <select name='access'>
- <option value='Admin'>Admin</option>
- <option value='Maintainer' default>Maintainer</option>
- <option value='Advisor'>Advisor</option>
- </select><br />");
- break;
- case 'Advisor':
- printf("<label>Access Level:</label>
- <select name='access'>
- <option value='Admin'>Admin</option>
- <option value='Maintainer'>Maintainer</option>
- <option value='Advisor' default>Advisor</option>
- </select><br />");
- break;
- }
- printf("<label>Password:</label><input type='text' name='pass' value='%s'/><br />", $row['password']);
- printf("<input type='submit' value='Create User' />");
- printf("</form>");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement