Advertisement
Guest User

Untitled

a guest
Apr 10th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. <?php
  2. include "conecta_mysql.inc";
  3.  
  4. $username = $_POST["username"];
  5. $password = $_POST["password"];
  6. $mail = $_POST["mail"];
  7. $confirm = $_POST["confirm"];
  8. $userid=trim($_POST['username']);
  9. $password=trim($_POST['password']);
  10. $initial=substr($userid,0,1);
  11. $userlenght=strlen($userid);
  12. $passlenght=strlen($password);
  13. $loc = "C:\\Users\\Adm\\Desktop\\Server\\DBSRV\\run\\account"; //Localização da Pasta Das Contas.
  14. $error = 0;
  15.  
  16. if(!ereg("^[0-9a-zA-Z]{4,12}$",$userid))
  17. {echo "<p class='style1'>Seu login so pode ter caracteres¸a-z,A-Z <a href='cadastro.php'><span class='style2'>Voltar</span></a>";exit(); $error=1;}
  18.  
  19. else if (strlen($mail)<8 || strstr ($mail, '@')==FALSE)
  20. {echo "<center>Favor Digitar seu email corretamente.</center><br><br>"; $error=1;}
  21.  
  22. if(!ereg("^[0-9a-zA-Z]{4,12}$",$password))
  23. {echo "<p class='style1'>Sua senha so pode ter caracteres¸a-z,A-Z <a href='cadastro.php'><span class='style2'>Voltar</span></a>";exit(); $error=1;}
  24.  
  25. if($password != $confirm){
  26. echo "<script>alert('As Senhas Não São Iguais');top.location.href='cadastro.php'; </script>"; $error=1;
  27. }
  28.  
  29. if(!UserNameExists($username))
  30. { echo "Este Usuario ja Existe<br><BR>"; $error=1;}
  31. if(!MailExists($mail))
  32. {echo "Este email ja Existe"; $error=1;}
  33.  
  34. if($error==0)
  35. {echo "Aproveite o Servidor";
  36. include "insere.inc";}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement