Advertisement
Guest User

Untitled

a guest
Aug 7th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. <?php
  2. if ($_POST['done'] == true)
  3. {
  4.     $connection = mysql_connect('123','123','123');
  5.     if (!$connection)
  6.     {
  7.         die('Could not connect: ' . mysql_error());
  8.     }
  9.     mysql_select_db("a8594642_data", $connection);
  10.     $password_md5 = md5($_POST['password'],false);
  11.     $sql=("INSERT INTO users (username, name, password) VALUES ('$_POST[user]','$_POST[name]','$boss')");
  12.     if (!mysql_query($sql,$con))
  13.     {
  14.         die('Error: ' . mysql_error());
  15.     }
  16.     mysql_close($con);
  17.     echo '<a href="index.php">Return</a>';
  18. }
  19. if ($_POST['done'] == false)
  20. {
  21.     echo '<form action="register.php" method="post"> Username: <input type="text" name="user" />
  22.    Name: <input type="text" name="name" />
  23.    Password: <input type="password" name="password" />
  24.    <input type="hidden" name="done" value="true" />
  25.    <input type="submit" /> </form>';
  26. }
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement