Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <?php include("top.html");
  2.  
  3. $url = 'http://raromero.millersville.edu/Lab8/nerdluv.php';
  4. $data = array('$name' => '$_POST["name"]',
  5. '$gender' => '$_POST["cc"]',
  6. '$age' => '$_POST["age"]',
  7. '$ptype' => '$_POST["personality"]',
  8. '$os' => '$_POST["favoriteos"]',
  9. '$minage' => '$_POST["minage"]',
  10. '$maxage' => '$_POST["maxage"]');
  11.  
  12. // use key 'http' even if you send the request to https://...
  13. $options = array(
  14. 'http' => array(
  15. 'method' => 'POST',
  16. 'content' => http_build_query($data)
  17. )
  18. );
  19. $context = stream_context_create($options);
  20. $result = file_get_contents($url, false, $context);
  21. ?>
  22. <div>
  23. <h1>Thank you!</h1>
  24. <?php $username = $_POST["name"]; ?>
  25. <ul>
  26. <li>
  27. Welcome to NerdLuv, <?="$username"?>!<br><br>
  28. Now
  29. <a href="matches.php">
  30. login to see your matches!
  31. </a>
  32. </li>
  33. </ul>
  34. </div>
  35. <?php include("bottom.html"); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement