If you've got any code for the actual submission of the data, that would be useful, but I'll just go on what I might do.
Firstly, I'd do the actual form processing on the thank you page, this way you can use the post method and get the person's name that way. (Another way of doing it would be to do the processing on the first page and then redirect to the thank you page with a URL like thanks.php?name=Bob
But, for me it just seems neater doing it the first way:
PHP Code:
<?php
if(isset($_POST['submit'])) {
// Do form processing
// Save stuff to database
// Somewhere in the data processing you get the value for the name
$name = $_POST['name'];
// Assuming that the database updating goes OK...
// Display thank you message
?>
<p>Thank you for your order <?php echo $name; ?>,</p>
<p>Bla bla bla...</p>
<?php
}
?>
If this doesn't make sense to you, or doesn't fit the way you're doing it right now, post what you've got so far and I'll see if I can adapt it.
Bookmarks