Guest User

Untitled

a guest
Dec 8th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <html>
  2. <body>
  3.  
  4.  
  5. <?php
  6.  
  7.  
  8. $con = mysql_connect("localhost","","");
  9.  
  10. $user=$_POST["user"];
  11. $nome=$_POST["nome"];
  12. $password=$_POST["password"];
  13. $email=$_POST["email"];
  14. $codico=$_POST["codico"];
  15. $localidade=$_POST["Localidade"];
  16.  
  17. if (!$con)
  18. {
  19. die('Could not connect: ' . mysql_error());
  20. }
  21.  
  22. mysql_select_db("book", $con);
  23.  
  24.  
  25.  
  26. $veriemail= mysql_query("SELECT Email FROM cliente");
  27.  
  28. if ($veriemail==$_POST["email"])
  29.  
  30. echo "Ja existe este email";
  31.  
  32.  
  33.  
  34. $inserir=mysql_query("INSERT INTO cliente (Username, adminyn, Nome, PassWord, Email ,CodicoP ,Localidade)
  35. VALUES ('$user', '0', '$nome', '$password', '$email', '$codico', '$Localidade');
  36.  
  37. if($inserir==1)
  38. echo"feito";
  39.  
  40. mysql_close($con);
  41.  
  42. ?>
  43. </body>
  44. </html>
Add Comment
Please, Sign In to add comment