Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST["username"]) and isset($_POST["password"]))
- {
- $username = $_POST["username"];
- $password = $_POST["password"];
- // connect to database
- $dbc = mysql_connect ('localhost','id4834055_jammyhall','password');
- mysql_select_db('id4834055_blogbase');
- // run insert query
- $result = mysql_query("INSERT INTO user (username, password) VALUES ('$username','$password')");
- // redirect to login page
- header("location:login.php");
- }
- else
- {
- // username or password not posted, redirect back to add user form
- header("location:Signup.php");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement