Jump to content

Sending customer details to email after customer confirms.


Recommended Posts

I have a created a form for customers to fill out before they make a purchase on my website.

 

The flow should work like this:

customer fills up form and submits ->

goes to next page which requires them to confirm their details and submits->

goes to paypal and customer details gets sent to email -> END.

 

i've already done up the form, which seems to be working fine. I just need to do up the php that will send the customer details to my email AFTER they have confirmed their details.

 

Here's the script/page that I've done up that lists the customer details and requests for confirmation:

 

<!--

<script type="text/javascript">

function submitTwice(f){

f.action = 'confirm.php';

f.target='_parent';

f.submit();

f.action = 'https://www.paypal.com/cgi-bin/webscr';

f.submit();

}

</script>

</head>

 

Please confirm that the following information is correct:

<br><br><br>

 

 

 

<form method="post">

<?php

$name = $_REQUEST['firstname']['lastname'];

$email = $_REQUEST['email'];

$add = $_REQUEST['add1'];

$phone = $_REQUEST['number'];

$tnc = $_REQUEST['tnc'];

 

 

if ($tnc == "yes")

{

  $update_status = "has read";

}

if ($tnc != "yes")

{

$update_status = "has not read";

}

 

  echo "<b>Your Name: </b><br>" . $_POST['firstname'] . ", " . $_POST['lastname'] ."<br /><br>";

  echo "<b>Email: </b><br>" . $_POST['email'] . "<br /><br>";

  echo "<b>Mailing Address: </b><br>" . $_POST['add1'] . "<br>" . $_POST['add2'] . "<br>" . $_POST['country'] . " " . $_POST['code'] . "<br /><br>";

  echo "<b>Contact Number: </b><br>" . $_POST['number'] . "";

?>

 

<br>

<br>

 

<input type="hidden" name="cmd" value="_s-xclick">

<input type="hidden" name="hosted_button_id" value="1897616">

<input type="image" src="https://www.paypal.com/en_GB/SG/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="" onclick="submitTwice(this.form)">

<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">

</form>

-->

 

 

How do i tell "confirm.php" that i want the customer details to be emailed to me?

 

Many thanks!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.