rahul.pache Posted January 26, 2009 Share Posted January 26, 2009 Hello !!! Happy new year (this is my fst post after new year 2009) When I tried to redirect my page to a new location I came to know that no POST data is sent while redirecting. So my question is: While redirecting a page to a new location using header("Location: newpage.php"); I want to send POST Data. Is there any method to do it ? Have a nice day !!! Quote Link to comment https://forums.phpfreaks.com/topic/142506-redirecting-with-post-data/ Share on other sites More sharing options...
Maq Posted January 26, 2009 Share Posted January 26, 2009 Why don't you use the get method and tack the variables on the end of the URL? Depending on what you're sending you could put it in a session as well. Let's see some code and a more detailed explanation of what you want. With the post you have to put it in a form. Quote Link to comment https://forums.phpfreaks.com/topic/142506-redirecting-with-post-data/#findComment-746860 Share on other sites More sharing options...
premiso Posted January 26, 2009 Share Posted January 26, 2009 If you are redirecting to a page internal, use sessions as Maq said. If not and you want to send data to another website, you would need to use curl Quote Link to comment https://forums.phpfreaks.com/topic/142506-redirecting-with-post-data/#findComment-746863 Share on other sites More sharing options...
rahul.pache Posted January 27, 2009 Author Share Posted January 27, 2009 If you are redirecting to a page internal, use sessions as Maq said. If not and you want to send data to another website, you would need to use curl How can I send data to a website using curl... Quote Link to comment https://forums.phpfreaks.com/topic/142506-redirecting-with-post-data/#findComment-747395 Share on other sites More sharing options...
rahul.pache Posted January 27, 2009 Author Share Posted January 27, 2009 I dont want to use get or session or cookie... I just want to send POST data as header to a page. I want to redirect to a page which is not in my server but I want to send data as well. Quote Link to comment https://forums.phpfreaks.com/topic/142506-redirecting-with-post-data/#findComment-747397 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.