Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

How To Redirct Post Data ?

Recommended Posts

I have a form, from where the data is being posted to a php script. Now in the php script the script has to forward the data to another script with posted data. I know this can be done using header but i don't know how to keep the data posted with form in POST method.For example: The form below:Code:<form method="POST" action="1.php"><input type="hidden" value="abc" name="t1"><input type="submit"></form>Now its posting data using POST method to 1.php...and now 1.php will redirect everything to another php script with the data and it should be in POST method ...How can i do this ?Thanks.

Share this post


Link to post
Share on other sites

Hmm, you can have a hidden form with hidden inputs in 1.php...

1.php:

<?php echo "<form method=\"POST\" action=\"[url of script to send info]\">\n\t"; echo "<input type=\"hidden\" name=\"[name of your choice]\" value=\"[value of the data from previous script]\">\n"; echo "<form>\n";?>

I hope this made sense, but this is essentially what you did in your example...

I'm still a newbie to PHP, so I'm trying the best I can to help you. :lol:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.