Guest User

Untitled

a guest
Sep 7th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. <?php
  2.  
  3. if(isset($_POST['submit']))
  4. {
  5. $username = htmlspecialchars(trim($_POST['username']));
  6. $password = htmlspecialchars(trim($_POST['password']));
  7. $repeatpassword = htmlspecialchars(trim($_POST['repeatpassword']));
  8. $email = htmlspecialchars(trim($_POST['email']));
  9. if($username&&$password&&$repeatpassword&&$email)
  10. {
  11. if(filter_var($email,FILTER_VALIDATE_EMAIL))
  12. {
  13.  
  14. if($password==$repeatpassword)
  15. {
  16.  
  17. $password = md5($password);
  18. $repeatpassword = md5($repeatpassword);
  19.  
  20. $connect = mysql_connect('127.0.0.1','mysql','');
  21. mysql_select_db('logins-data');
  22. $reg = mysql_query("SELECT * FROM logins-place WHERE name='$username'");
  23. $rows = mysql_num_rows($reg);
  24.  
  25. if($rows==0)
  26. {
  27.  
  28. $token = rand('100000','99999');
  29.  
  30. $query = mysql_query("INSERT INTO logins VALUES('','$username','$password','$repeatpassword','$email',$token','0')");
  31.  
  32. die("Inscription réussie <a href='login.php'>connéctez</a> vous");
  33. }else echo"Ce pseudo n'est pas disponible";
  34. }else echo"Les deux passwords doivent être identiques";
  35. }else echo"Veuillez saisir tous les champs";
  36. }else echo"Veuillez saisir un email valide";
  37. }
  38. ?>
  39.  
  40.  
  41.  
  42.  
  43.  
  44. <table align="center" border="0" width="220" cellspacing="0" cellpadding="0">
  45. <tr>
  46. <td width="100%">
  47.  
  48. <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#000000"><tr>
  49.  
  50. <form method="POST" action="reg1.php" onsubmit="">
  51. <input type="hidden" name="id" value="15466">
  52.  
  53. <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td width="100%" colspan="2" bgcolor="#000000"><p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
  54.  
  55. Zone connextion</font></b></td></tr>
  56.  
  57. <tr><td width="60%" bgcolor="#3D76A7"><p align="right"><font face="Verdana" size="2" color="#000000">
  58.  
  59. Psedo: </font></p></td><td width="44%" bgcolor="#3D76A7"><p align="left"><font face="Verdana" size="2"><input type="text" name="login" size="10"> </font></p></td></tr>
  60.  
  61. <tr><td width="60%" bgcolor="#3D76A7"><p align="right"><font face="Verdana" size="2" color="#000000">
  62.  
  63. Mot de passe: </font></p></td><td width="44%" bgcolor="#3D76A7"><p align="left"><font face="Verdana" size="2"><input type="password" name="password" size="10"> </font></p></td></tr>
  64.  
  65. <tr><td width="100%" colspan="2" bgcolor="#3D76A7"><p align="center"><input type="submit" value="Login" name="submit" onclick="this.value='Loading...'"></td></tr>
  66.  
  67. <tr><td width="100%" colspan="2" bgcolor="#000000"><p align=center><font size="2" face="Verdana" color="#FFFFFF">
  68.  
  69.  
  70.  
  71. [ <a style="color:#FFFFFF" href="#" onClick="-ajouter une action-">Inscrivez-vous</a> ]<br>
  72. [ <a style="color:#FFFFFF" href="#" onClick="-ajouter une action-">Gérer votre compte</a> ]<br>
  73. [ <a style="color:#FFFFFF" href="#" onClick="-ajouter une action-">Oublié ?</a> ]
  74.  
  75. </font></td>
  76.  
  77. </tr></table></td></form></tr></table></td></tr></table>
Add Comment
Please, Sign In to add comment