szejia Posted December 18, 2008 Share Posted December 18, 2008 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! Quote Link to comment https://forums.phpfreaks.com/topic/137486-sending-customer-details-to-email-after-customer-confirms/ Share on other sites More sharing options...
sKunKbad Posted December 18, 2008 Share Posted December 18, 2008 you could use cURL to post to any formmail program. I recommend tectite.com's formmail program, but there are many to choose from. Quote Link to comment https://forums.phpfreaks.com/topic/137486-sending-customer-details-to-email-after-customer-confirms/#findComment-718536 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.