Results 1 to 3 of 3

Thread: Personalise - Thank you /confirmation page

  1. #1
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Personalise - Thank you /confirmation page

    Hi Folks,

    I have a form that people populate with personal information, name, surname etc.

    This information is stored in MySQL.

    On submission of the data using the form a page is shown saying thank you.

    I would like the name of the peron submitting the form to show in the thank you page.

    I do not know how to write this script and would appreciate any help.

    Regards
    ROb

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    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.

  3. #3
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    Thanks for the prompt reply.

    I have attached a txt file - maybe this will help

    Regards
    Rob

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •