Advertisement
Guest User

Untitled

a guest
May 14th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link href="styles/style.css" rel="stylesheet" type="text/css">
  5. <link href="styles/background.css" rel="stylesheet" type="text/css">
  6. <link href="styles/body.css" rel="stylesheet" type="text/css">
  7. <link href="styles/title.css" rel="stylesheet" type="text/css">
  8. <link href="styles/head.css" rel="stylesheet" type="text/css">
  9. <link href="styles/menu.css" rel="stylesheet" type="text/css">
  10. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lobster" />
  11.  
  12. <meta charset="utf-8">
  13. <title>Acceuil</title>
  14. <h1>
  15. <d> Acceuil TP </d>
  16. </h1>
  17. <br>
  18. <h7>
  19. <h7>
  20. <br>
  21. <form method="post" action="ton_action">
  22. <p>
  23.  
  24. </p>
  25. </form>
  26. </h4>
  27. <br>
  28. </head>
  29. <body>
  30. <br>
  31. <d> En classe de : </d>
  32. <br>
  33. <br>
  34. <div class='ribbon'>
  35. <a href='Page 1.html'><span>TP 6eme</span></a>
  36. <a href='Page 2.html'><span>TP 5eme</span></a>
  37. <a href='Page 3.html'><span>TP 4eme</span></a>
  38. <a href='Page 4.html'><span>TP 3eme</span></a>
  39. </div>
  40. <br>
  41. <br>
  42.  
  43. <?php
  44.  
  45.  
  46. if(isset($_POST['submit']))
  47.  
  48. {
  49. $username =htmlentities(trim($_POST['username']));
  50. $password =htmlentities(trim($_POST['password']));
  51. $repeatpassword = htmlentities(trim($_POST['repeatpassword']));
  52. if($username&&$password&&$repeatpassword)
  53. {
  54. if($password==$repeatpassword)
  55. {
  56. $bdd = new PDO('mysql:host=localhost;phplogin;charset=utf8', 'root', '');
  57.  
  58. $bdd->exec('INSERT INTO user(id, username, password) VALUES(NULL, \'$username\', \'$password\')');
  59. $reponse = $bdd->query('SELECT * FROM user');
  60.  
  61.  
  62. die("Inscription terminée,connéctez vous");
  63. }else echo"Les deux mots de passe doivent être identique";
  64.  
  65. }else echo"Veuillez saisir tout les champs";
  66. }
  67.  
  68.  
  69.  
  70.  
  71. ?>
  72.  
  73. <form method="POST" action="register.php">
  74. <p> Votre identifiant :</p>
  75. <input type="text" name="username">
  76. <p> Mot de passe :</p>
  77. <input type="password" name="password">
  78. <p> Repetez votre mot de passe </p>
  79. <input type="password" name="repeatpassword">
  80. <input type="submit" value="S'inscrire" name="submit">
  81. </body>
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement