1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 4. <head> 5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 6. <title>Forum Posting</title> 7. </head> 8. <body> 9. <?php // Script 5.5 - handle_post.php #4 10. /* This script receives five values from posting.html: 11. first_name, last_name, email, posting, submit */ 12. 13. // Address error management, if you want. 14. 15. // Get the values from the $_POST array: 16. $first_name = $_POST['first_name']; 17. $last_name = $_POST['last_name']; 18. $posting = nl2br($_POST['posting']); 19. 20. // Create a full name variable: 21. $name = $first_name . ' ' . $last_name; 22. 23. // Print a message: 24. print "<div>Thank you, $name, for your posting: 25. <p>$posting</p></div>"; 26. 27. // Make a link to another page: 28. $name = urlencode($name); 29. $email = urlencode($_POST['email']); 30. print "<p>Click <a href=\"thanks.php?name=$name&email=$email\">here</a> to continue.</p>"; 31. 32. ?> 33. </body> 34. </html>