Jump to content

keep control while passing form entries


Don Diego

Recommended Posts

I have the following code in an intermediate file, separate.php, passing values from a form to a receiving file:

 

form -> separate.php file -> vendor's receiving file

 

<?php
$url="https://receivingsite.com/receive.jsp?";
foreach($_POST as $key => $value)
{
$url .="$key=" . urlencode($value) . "&";
}
header ("Location: $url");
?>

 

I place other code (all working), ahead of the code in question.

 

Then, the portion of the other code that sends an email to me containing the values from the form, still does that.

 

The portion of the other code that opens another page, does not open it any more.

 

Instead, a nuisance (to me) confirmation page generated by the vendor's receiving file opens instead of the page I specified in my other code.

 

This is the part of the other code that does not open any more:

 

print "<meta http-equiv=\"refresh\" content=\"0;URL=http://mywebsite.com/next.htm\">";

 

I have to send to their receiving file with the confirmation page because the regular one they designed for this purpose (no confirmation page) requires that the form's redirect field be included, and that is a problem to me (not to most of their customers) because I have two buttons in the form going to two different pages, instead of one button like all their other customers would have.

 

The receiving file (confirmation page) that I have to send to was designed with a different use in mind, but I have to send to it because the regular one must receive a form field that I do not want to include.

 

So it seems that I need to replace header ("Location: $url"); with something else, or make some other change or addition.

 

Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/48818-keep-control-while-passing-form-entries/
Share on other sites

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.