Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. -test.html-----------------------
  2. <form action="b.php" method="GET">
  3. <input type="text" name="first" />
  4. <input type="text" name="last" />
  5. <input type="text" name="id" />
  6. <input type="text" name="salary" />
  7. <input type="submit" />
  8. </form>
  9.  
  10.  
  11. -b.php---------------------------
  12.  
  13. <?php
  14. if(!(isset($_GET['first']))) {
  15. die("<h1>FAIL</h1>");
  16. }
  17. if(!(isset($_GET['last']))) {
  18. die("<h1>FAIL</h1>");
  19. }
  20. if(!(isset($_GET['id']))) {
  21. die("<h1>FAIL</h1>");
  22. }
  23. if(!(isset($_GET['salary']))) {
  24. die("<h1>FAIL</h1>");
  25. }
  26. $request = $_GET;
  27. ?>
  28. <html>
  29. <body>
  30. <?php
  31. echo <<<EOD
  32. Hello ${request['first']} ${request['last']}.<br />
  33. Your Identification Number is ${request['id']},
  34. and you make \$${request['salary']}.
  35. EOD;
  36. ?>
  37. </body>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement