Guest User

Untitled

a guest
Jun 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <h2>Manage Users</h2>
  2. <a href="?int=1&m=new">New User</a> <a href="?int=1&m=edit">Edit Users</a> <br />
  3. <?php
  4. if ($_GET['m'] == "new")
  5. {
  6. echo "<h3>Manage Users</h3>\n";
  7. echo "<form action='?int=1&m=new2' method='POST'> \n";
  8. echo " <fieldset> \n";
  9. echo " <h4>Credentials</h4> \n";
  10. echo " Username <input type='text' name='username' /><br /> \n";
  11. echo " Password <input type='text' name='password' /> \n";
  12. echo " </fieldset> \n";
  13. echo "<input type='submit' value='Create User' /> <input type='reset' /> \n";
  14. echo "</form>";
  15. }
  16. elseif ($_GET['m'] == "new2")
  17. {
  18. $newusername = $_POST['username'];
  19. $newpassword = $_POST['password'];
  20. mysql_query("INSERT INTO users (userName,password) VALUES ($username, $password)");
  21. echo "Created User '". $_POST['username'] . "'";
  22. }
  23. elseif ($_GET['m'] == "edit")
  24. {
  25. echo "Edit User";
  26. };
  27. ?>
  28. <br /><a href="?int=1&m=new">New User</a> <a href="?int=1&m=edit">Edit Users</a>
Add Comment
Please, Sign In to add comment