Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="utf-8">
- <title>Login Details</title>
- <link type="text/css" rel="stylesheet" href="css.css">
- </head>
- <body bgcolor="black">
- <div class = box>
- <center>
- <section class="container">
- <h1>Admin Registration</h1>
- <?php
- require('config.php');
- if (isset($_POST['submit'])){
- extract($_REQUEST);
- $user = $_POST['user'];
- $username = $_POST['username'];
- $password = $_POST['password'];
- $password = md5($password);
- //pass variables and add them to database
- mysql_query("INSERT INTO login ('id', 'user', 'username', 'password') VALUES(NULL, '$user', '$username', '$password')");
- echo "Registration Successful";
- }
- else{
- //allows for html in php which is needed for the form
- echo $form='
- <form action = "registration_form.php" method="POST">
- User Type: <input type = "text" name= "user" /><br />
- Username: <input type = "text" name= "username" /><br />
- Password: <input type = "text" name= "password" /><br /><br />
- <input type="submit" value="Register" name="submit" />
- </form>';
- }
- ?>
- </center>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement