guitarist809 Posted March 12, 2007 Share Posted March 12, 2007 Is there a way to forward $_POST (or $HTTP_POST_VARS) in php? (without using a form or anything...) Link to comment https://forums.phpfreaks.com/topic/42385-forwarding-post-vars/ Share on other sites More sharing options...
papaface Posted March 12, 2007 Share Posted March 12, 2007 Sessions e.g <?php session_start(); $_SESSION['name'] = $_POST['name']; ?> Link to comment https://forums.phpfreaks.com/topic/42385-forwarding-post-vars/#findComment-205580 Share on other sites More sharing options...
guitarist809 Posted March 13, 2007 Author Share Posted March 13, 2007 Oh... thats... easy... can I do $_SESSION['postvars'] = $_POST; and then on the next page $_POST .= $_SESSION['postvars'] (because there might be more post vars...).... Link to comment https://forums.phpfreaks.com/topic/42385-forwarding-post-vars/#findComment-206445 Share on other sites More sharing options...
Orio Posted March 13, 2007 Share Posted March 13, 2007 $_POST .= $_SESSION['postvars'] (because there might be more post vars...).... That won't work, but this will: $_POST = array_merge($_SESSION['postvars'], $_POST); Orio. Link to comment https://forums.phpfreaks.com/topic/42385-forwarding-post-vars/#findComment-206447 Share on other sites More sharing options...
guitarist809 Posted March 13, 2007 Author Share Posted March 13, 2007 sweet thx Link to comment https://forums.phpfreaks.com/topic/42385-forwarding-post-vars/#findComment-206458 Share on other sites More sharing options...
guitarist809 Posted March 13, 2007 Author Share Posted March 13, 2007 Well, I just found out that session_start() gives a ton of errors in a phpbb forum. Is there another way besides using cookies or sessions? Link to comment https://forums.phpfreaks.com/topic/42385-forwarding-post-vars/#findComment-206472 Share on other sites More sharing options...
papaface Posted March 13, 2007 Share Posted March 13, 2007 Nope. The reason youll be getting errors in phpbb is because session_start() has to go at the top of the page. Try and find a way to get it there when phpbb pharses it. Link to comment https://forums.phpfreaks.com/topic/42385-forwarding-post-vars/#findComment-206505 Share on other sites More sharing options...
Orio Posted March 13, 2007 Share Posted March 13, 2007 I believe all of phpbb's pages call session_start()... Try just to assign ($_SESSION['postvars'] = $_POST;) without calling session_start() and see if it works. Orio. Link to comment https://forums.phpfreaks.com/topic/42385-forwarding-post-vars/#findComment-206508 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.