jrobles Posted December 28, 2009 Share Posted December 28, 2009 I am trying to capture my payment data before I post my form values to the payment website. I have an IF statement that says if form isn't submitted display for else insert the data into various tables. The problem is that i have the form action set to the url of the payment website and that seems to be firing off before I can insert the records into the table. If i set the form action to action="" and in then put the header location as the payment website after I insert the data i get the headers already sent error. here are some examples of my code with a brief description of what happens if (!isset($_POST['Submit'])) {<form action="https://ccprocessingsite.com" method="post"></form>} else {INSERT DATA INTO TABLES} The above code sends the data to the payment site but does not enter the data into the DB tables if (!isset($_POST['Submit'])) {<form action="" method="post"></form>} else {INSERT DATA INTO TABLES; header('Location:https://ccprocessingsite.com'); } This example adds the data to the tables but does not send the form post to the payment website for processing I'm sure there is a simple way to do this, but I'm stumped. ANY help would be GREATLY appreciated THANKS IN ADVANCE!!!! Link to comment https://forums.phpfreaks.com/topic/186532-problems-submitting-form/ Share on other sites More sharing options...
jrobles Posted December 28, 2009 Author Share Posted December 28, 2009 any help? Link to comment https://forums.phpfreaks.com/topic/186532-problems-submitting-form/#findComment-985173 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.