Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- header('Content-Type: text/html; charset= utf-8');
- ?>
- <head>
- <title>reg-php</title>
- </head>
- <body>
- <?php
- $dbconnect = mysql_connect("localhost", "root", "")
- or die("Could not connect: " . mysql_error());
- print ("Connected successfully");
- mysql_select_db("mysite_bd");
- $nickname = $_POST['nickname'];
- $password = $_POST['password'];
- $email = $_POST['email'];
- $name = $_POST['name'];
- $dbinsert = mysql_query("INSERT INTO users(nick, password, email, name) VALUES ('$nickname', '$password', '$email', '$name')");
- mysql_close($dbconnect);
- header('Location: index.html');
- ob_end_flush();
- ?>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement