Echo contact form fields on confirmation page

Discussion in 'PHP' started by m0z70, Apr 15, 2010.

  1. #1
    I'm using a PHP contact form that collects the data as below:

    $Email = Trim(stripslashes($_POST['Email'])); 
    $EmailTo = 'email@email.com';
    $Subject = 'Website Enquiry';
    $Name = Trim(stripslashes($_POST['Name'])); 
    $Phone = Trim(stripslashes($_POST['Phone'])); 
    $Address = Trim(stripslashes($_POST['Address'])); 
    $Message = Trim(stripslashes($_POST['Message']));
    $URL = Trim(stripslashes($_POST['URL']));
    $Database = Trim(stripslashes($_POST['Database'])); 
    $Payment = Trim(stripslashes($_POST['Payment'])); 
    Code (markup):
    Then sends it to my email and uses a meta refresh to go to the confirmation page:

    // redirect to success page 
    if ($success){
      print "<meta http-equiv=\"refresh\" content=\"0;URL=../order-confirmation.php\">";
    }
    else{
      print "<meta http-equiv=\"refresh\" content=\"0;URL=../order-error.php\">";
    }
    Code (markup):
    Q1. How can I include some of the fields gathered above so that they can be displayed on the order-confirmation.php page?

    Q2. Is there some way that I can also post the information to Google Docs? Would this be done at the form post level:

    <form method="post" action="includes/order.php">
    
    Code (markup):
    Or, on that page - includes/order.php (most of which is pasted above).

    Thanks in advance for your help!
     
    m0z70, Apr 15, 2010 IP
  2. georgiivanov

    georgiivanov Member

    Messages:
    62
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    25
    #2
    Last edited: Apr 15, 2010
    georgiivanov, Apr 15, 2010 IP
  3. m0z70

    m0z70 Member

    Messages:
    285
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #3
    m0z70, Apr 15, 2010 IP
  4. m0z70

    m0z70 Member

    Messages:
    285
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #4
    Actually, I got it. Thanks for your help - I was just missing the "echo" on the call.
     
    m0z70, Apr 15, 2010 IP