Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <h1>User Creation</h1>
- <?php
- session_start();
- if($_SESSION['login'] != "OK")
- {
- header('Location: login.php');
- exit();
- }
- $new_user = $_POST["new_username"];
- $new_pass = $_POST["new_password"];
- $new_first = $_POST["new_firstname"];
- $new_last = $_POST["new_surname"];
- include_once("connection/conn.php");
- $sql = "INSERT INTO Users (Loginname, Password, Firstname, Surname) VALUES ('$new_user','$new_pass','$new_first','$new_last')";
- mysql_query($sql,$conn) or die ("User creation failed.");
- echo "<p>User created successfully.</p>";
- echo "<p>Return to <ahref='protected.php'>application</a> or <a href='login.php'>log out</a></p>";
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement