Experts Exchange connects you with the people and services you need so you can get back to work.
Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.
Wait, so 'name' is a must?
<?php // demo/form_thankyou_page.php
// SHOW HOW TO DO FORM INPUT, VALIDATION, AND THANK YOU PAGE
// IF THERE IS SOMETHING THAT HAS BEEN POSTED
// THIS IS THE VALIDATION PROCESS - ONLY TWO RESULTS
// EITHER A FAILURE PAGE OR A THANK YOU PAGE
// CHECK TO SEE IF IT IS WHAT WE EXPECT
if ($_POST["xyz"] != 'XYZ')
// CREATE ERROR PAGE IF DATA FAILED VALIDATION
echo PHP_EOL . "SORRY YOU DID NOT ENTER XYZ";
// CREATE THANK YOU PAGE IF DATA PASSED VALIDATION
echo PHP_EOL . "THANK YOU, ";
die("ALL DONE NOW");
// END OF PHP - DROP INTO HTML TO PUT UP THE FORM
ENTER 'XYZ' IN UPPER CASE LETTERS HERE:
<input name="xyz" />
<input type="submit" />
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.