So I've done quite a few forms before but I'm running into trouble with this one. I'm not exactly sure what I need to do, but let me explain.
Form A collects basic data from a customer. Form B give you the option to select two products (Pay Pal). Depending on what product you pick, the last field on Form A will populate with that value, which was blank before.
I chose to do it this way because my type of Pay Pal account couldn't handle multiple custom fields. I also needed to know which customers data corresponds to what package they ordered and not have to figure it out through Pay Pal incase the e-mail they enter is different for whatever reason. What I need is when the "buy now" button is clicked, the php action for form A to run and for the customer to be redirected to Pay Pal to pay.
I've tried it several ways but nothing is working, the form info is not coming through to my e-mail - it only brings the customer to Pay Pal. I was thinking to have two actions on the Pay Pal form, but something doesn't make sense to me with that. I tried some jQuery to make the form submit without refreshing or redirecting but that didn't work. I really need both actions to be triggered as the absolute last thing they do. For example if the customer selects the higher priced package, and hits submit on the first form, they can go back select the lower level package and pay for that. Granted I would probably catch it, but it just seems like a headache to me.
Here's part of what I'm working with:
and my php
<?php $emailSubject = 'Citation'; $webMaster = 'firstname.lastname@example.org'; $price = $_POST['price']; $body = <<<EOD Citation:<br> Package: $price<br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); $theResults = <<<EOD EOD; echo "$theResults"; ?>
Sorry I couldn't post everything. There's not really one thing I'm trying to "fix" I've just been working with a whole bunch of different pieces and moving everything around. Let me know if you have any suggestions.