I have an html page that allows folks to register for an uncoming event, once they fill in the information and hit a Calculate button to figure up their total amount to pay to attend the event, they hit a Pay Now button and it takes them to PayPal to make payment, I want to email all their information on the prior page only after they make Payment. When it takes them to PayPal, the button I created has 2 pages it will take them to dependent on their response once in there. It will take them to a Thank You page for making payment or it will take them to a page that say they didn't make payment and please come back and register later. If they go to the made payment page, I have an asp sciprt that will email all the information from the original page, but I don't know how to get all that information from the original page through the PayPal page, then to the Thank you page and to the asp script. If they end up going to the didn't make payment page, it will just direct them back to the home page for the original site. I have all this working except passing the information all the way to the email script. Can this be done and more importantly, how? I currently have this java script function in my Thank You page to try and pull in the information, but it isn't working. There are many more fields, but I am just trying to pull the first name and last name and it go through to the email to see that it works.
Thanks in advance!
Code:
<script type="text/javascript">
function GetParam(name)
{
var start=location.search.indexOf("?"+name+"=");
if (start<0) start=location.search.indexOf("&"+name+"=");
if (start<0) return '';
start += name.length+2;
var end=location.search.indexOf("&",start)-1;
if (end<0) end=location.search.length;
var result='';
for(var i=start;i<=end;i++) {
var c=location.search.charAt(i);
result=result+(c=='+'?' ':c);
}
return unescape(result);
}
GetParam('FirstName')
GetParam('LastName')
</script>
Comment