Jump to content

Sending customer details to email after customer confirms.


szejia

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.