i have a script writing to a db; now i want to add a paypal action to it: action="https://www.paypal.com/cgi-bin/webscr" method="post" so when i hit submit on the form the variables pertaining to the paypal purchase are sent on to their site while the db variables are still written... am i asking too much?
thanks, glenn
No, just use a header. have the action of your form be a page that sends nothing to the browser. do all your validation, etc. If it pasts all the tests, then insert into your db, and use header(location:blah blah blah) to access paypal.
yeah, it has a header already that goes to a ../thankyou.html - i was wondering if that would work. the header url would take the variables with it? or do i need to pass them somehow..?
instead of:
$query="insert into Cars (clientID,...field3) values ('".$clientID."'...".$field3."')"; mysql_query($query); header("Refresh: 0;url=http://www.safe-teen.net/purchase.htm"); } ?>
this ?
mysql_query($query); header("Refresh: 0;url=https://www.paypal.com/cgi-bin/webscr"); } ?>