Jump to content

Linkpoint cc processing help


jrobles

Recommended Posts

I am trying to insert the form data before I post the form to the linkpoint site. I tried making the action="" then set the header location to the linkpoint site after the data is entered into the but i get headers already sent errors.

 

if (!isset($_POST['Submit']))
{echo"
<form action='' method='post'>
blah
blah
blah
</form>";}
else
{INSERT blah into blah;
header("Location: www.linkpointcentral.com/blah/blah ")
} 

 

 

 

How can I insert into my db before the form is posted to the linkpoint url?

Link to comment
https://forums.phpfreaks.com/topic/186544-linkpoint-cc-processing-help/
Share on other sites

You're not supposed to output ANY data before sending another header. Make sure there is no echo statement or whitespace before the opening <?php tag. If you must use the header after outputting data to the browser, than put this at the top of your code, ob_start

<?php
ob_start(); //Start output buffer

 

This will fix the headers already sent error, but should be seen as a bandaid rather than a solution.

Thanks for the help, I figured out a work-around that happy with. The form action is set to "". When the user submits the form the data is entered then a confirmation shows where the user can doublecheck their info then hit submit. The second form sends the data to the payment gateway.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.