Forum Moderators: coopster
if you may wonder. i have a created a form that submits to a processing page, that shoots email and my client has its own credit card processing which resides in a different domain and i want to send the fields that i have extracted from my form to that credit card processing domain which resides in another server.
On the first processing page, do the processing but do not output anything. For example, go ahead and dump the data into the database and send your mail, but don't 'print()' or 'echo' or 'header()' anything until you are done with your end of the process.
Once your stuff is finished, add:
$nexturl="process2.php?formvar1=".$formvar1; header("Location: $nexturl"); exit; Build the next location into a variable and use the 'header()' function to send it there.
Note that any output at all, including blank lines in the script, before the 'header()' function will break it.
As far as redirecting info to another domain and keeping the visitor on your site at the same time, I'm not sure about that. Maybe output buffering can be used? Or you could use Javascript to popup a window with the outside redirect instructions passed via the popup URI to handle the card processing from the final page in your site's handling sequence?