Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($_POST['done'] == true)
- {
- $connection = mysql_connect('123','123','123');
- if (!$connection)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db("a8594642_data", $connection);
- $password_md5 = md5($_POST['password'],false);
- $sql=("INSERT INTO users (username, name, password) VALUES ('$_POST[user]','$_POST[name]','$boss')");
- if (!mysql_query($sql,$con))
- {
- die('Error: ' . mysql_error());
- }
- mysql_close($con);
- echo '<a href="index.php">Return</a>';
- }
- if ($_POST['done'] == false)
- {
- echo '<form action="register.php" method="post"> Username: <input type="text" name="user" />
- Name: <input type="text" name="name" />
- Password: <input type="password" name="password" />
- <input type="hidden" name="done" value="true" />
- <input type="submit" /> </form>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement