Advertisement
Guest User

Untitled

a guest
Apr 9th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2. include("sql.php");
  3. $hostname = "localhost";
  4. $user = "root";
  5. $dbpassword = "";
  6. $database = "warpweb";
  7. connect($database,$user,$dbpassword,$hostname);
  8.  
  9. $Username = $_POST['RUsername']; //Username
  10. $Password = $_POST['RPassword']; //Senha
  11. $Email = $_POST['REmail']; //Email
  12.  
  13. if($Username == ''){
  14.     //Se o Username está vazio, volta para o index
  15.     header("Location: ../index.php");
  16. }else{
  17.     if($Password = ''){
  18.      //Se a senha está vazia, volta pro index
  19.      header("Location: ../index.php");
  20.     }else{
  21.         if($Email == ''){
  22.           //Se o Email está vazio, volta pro index
  23.           header("Location: ../index.php");
  24.         }else{
  25.              $PasswordCrypt = md5($Password);
  26.              mysql_query("INSERT INTO users (Username,Password,Email) VALUES ('$Username','$PasswordCrypt','$Email')") or die(header("Location: ../index.php"));
  27.              header("Location: ../index.php");
  28.         }
  29.     }
  30. }
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement