Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h2>Manage Users</h2>
- <a href="?int=1&m=new">New User</a> <a href="?int=1&m=edit">Edit Users</a> <br />
- <?php
- if ($_GET['m'] == "new")
- {
- echo "<h3>Manage Users</h3>\n";
- echo "<form action='?int=1&m=new2' method='POST'> \n";
- echo " <fieldset> \n";
- echo " <h4>Credentials</h4> \n";
- echo " Username <input type='text' name='username' /><br /> \n";
- echo " Password <input type='text' name='password' /> \n";
- echo " </fieldset> \n";
- echo "<input type='submit' value='Create User' /> <input type='reset' /> \n";
- echo "</form>";
- }
- elseif ($_GET['m'] == "new2")
- {
- $newusername = $_POST['username'];
- $newpassword = $_POST['password'];
- mysql_query("INSERT INTO users (userName,password) VALUES ($username, $password)");
- echo "Created User '". $_POST['username'] . "'";
- }
- elseif ($_GET['m'] == "edit")
- {
- echo "Edit User";
- };
- ?>
- <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