Advertisement
Guest User

Untitled

a guest
Dec 16th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <HTML>
  3. <HEAD>
  4. <META charset="utf-8">
  5. <TITLE> Domino's Pizza - Home </TITLE>
  6. <link href="style.css" rel="stylesheet" type="text/css"/>
  7. </HEAD>
  8. <BODY>
  9. <header class="cf">
  10. <div class="wrapper">
  11. <div id="logo">
  12. <img src="logo.png" alt="dominos logo"/>
  13. </div>
  14. <div id="login">
  15. <form>
  16. <table>
  17. <tr>
  18. <td> <input type="text" placeholder="email"/></td>
  19. <td> <input type="password" placeholder="κωδικός"/></td>
  20. <td><input type="submit" value="Σύνδεση"/></td>
  21. </tr>
  22. </table>
  23. </form>
  24. </div>
  25. </div>
  26. </header>
  27. <main class="wrapper cf">
  28. <section>
  29. <img src="pizza.jpg" alt="pizza"/>
  30. </section>
  31. <div id="eggrafi">
  32. <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="POST">
  33. <table>
  34. <tr><th colspan="2"> Εγγραφή </th> </tr>
  35. <tr>
  36. <td> <input type="text" placeholder="To όνομά σου" name="cname"/></td>
  37. <td> <input type="text" placeholder="To επίθετό σου" name="csurname"/></td>
  38. </tr>
  39. <tr>
  40. <td colspan="2"><input type="email" placeholder="To email σου" name="cemail"/></td>
  41. </tr>
  42. <tr>
  43. <td colspan="2"><input type="pasword" placeholder="Ο κωδικός σου" name="cpassword"/></td>
  44. </tr>
  45. <tr>
  46. <td colspan="2"><input type="pasword" placeholder="Επαλήθευση κωδικού" name="epassword"/></td>
  47. </tr>
  48. <tr>
  49. <td colspan="2"><input type="submit" value="Εγγραφή" name="submit"/></td>
  50. </tr>
  51. </table>
  52. </form>
  53. <?php
  54.  
  55. if (isset($_POST["submit"])){
  56.  
  57. include ("config.php");
  58.  
  59. $cname = $_POST["cname"];
  60. $csurname = $_POST["csurname"];
  61. $cemail = $_POST["cemail"];
  62. $cpassword = $_POST["cpassword"];
  63. $epassword = $_POST["epassword"];
  64.  
  65. if ($cpassword!=$epassword) {
  66. echo "Oι κωδικοί σας δεν ταιριάζουν";
  67. }
  68. else {
  69. $sql = "INSERT INTO customer (cname,csurname,cemail,cpassword)
  70. VALUES ( '$cname', '$csurname', '$cemail', '$cpassword' )" ;
  71.  
  72. $result = $conn -> query($sql);
  73.  
  74. header("Location:order.php");
  75.  
  76. }
  77.  
  78. }
  79.  
  80.  
  81. ?>
  82. </div>
  83. </main>
  84. </BODY>
  85. </HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement