Guest User

Untitled

a guest
Dec 7th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1.  
  2.  
  3. Anthony Lockett
  4.  
  5. On Thursday 19th May 2011, @Nucleiosis said:
  6.  
  7. @phpacademy Here is the code when this php is included the form does not show on the page.
  8.  
  9.  
  10. <?php
  11.  
  12. echo "
  13.  
  14. REGISTER!
  15.  
  16. "
  17.  
  18. $submit = $_POST['submit'];
  19.  
  20.  
  21. //form data
  22. $firstname = $_POST['firstname'];
  23. $lastname = $_POST['lastname'];
  24. $email = $_POST['email'];
  25. $username = $_POST['username'];
  26. $password = $_POST['password'];
  27. $repeatpassword = $_POST['repeatpassword'];
  28.  
  29. if ($submit)
  30. {
  31.  
  32. echo "$firstname/$lastname/$email/$username/$password/$repeatpassword"
  33.  
  34. }
  35.  
  36.  
  37.  
  38. ?>
  39.  
  40. <html>
  41.  
  42. <form action='register.php'>
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. <input type='text' name='firstname' placeholder='First Name'>
  65.  
  66. <input type='text' name='lastname' placeholder='Last Name'>
  67.  
  68. <input type='email' name='email' placeholder='Email'>
  69.  
  70. <input type='text' name='username' placeholder='Username'><br>
  71.  
  72. <input type='password' name='password' placeholder='Password'>
  73.  
  74. <input type='password' name='repeatpassword' placeholder='Repeat Password'>
  75.  
  76.  
  77. <input type='submit' name='submit' value='Register!'>
  78.  
  79. </form>
  80.  
  81. </html>
  82.  
  83. When it is like this the form shows up
  84.  
  85.  
  86. <?php
  87.  
  88. echo "
  89.  
  90. REGISTER!
  91.  
  92. "
  93.  
  94. ?>
  95.  
  96. <html>
  97.  
  98. <form action='register.php'>
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120. <input type='text' name='firstname' placeholder='First Name'>
  121.  
  122. <input type='text' name='lastname' placeholder='Last Name'>
  123.  
  124. <input type='email' name='email' placeholder='Email'>
  125.  
  126. <input type='text' name='username' placeholder='Username'><br>
  127.  
  128. <input type='password' name='password' placeholder='Password'>
  129.  
  130. <input type='password' name='repeatpassword' placeholder='Repeat Password'>
  131.  
  132.  
  133. <input type='submit' name='submit' value='Register!'>
  134.  
  135. </form>
  136.  
  137. </html>
Add Comment
Please, Sign In to add comment