monkeybidz Posted February 24, 2007 Share Posted February 24, 2007 Heres the deal. My form passes variables to the form_results.php. I have made a link on form_results.php so that users can go to another page. In that next page, i want users to be able to see 2 variables from the form_results.php page. Here are the variables as they appear in pages: Form: $quote_num $total From Results: echo "$quote_num" echo "$total" New Page: echo "$quote_num" echo "$total Can't get the variables in the third page. What am i doing wrong? Thanks in advance! ??? Link to comment https://forums.phpfreaks.com/topic/39946-passing-variables-from-form-results-page-to-another/ Share on other sites More sharing options...
kickassamd Posted February 24, 2007 Share Posted February 24, 2007 Easiest thing to do is pass them in the URL to page 3 .. then use $_GET to pull the variables from the URL. You can also store the variables in $_SESSION and pass them on the the next page. From results page: <a href="http://www.yoursite.com/new_page.php?quote_num=$quote_num&total=$total" />New Page</a> New page: echo $_GET['quote_num']; echo $_GET['total']; Session Method:: From results page: session_start(); $_SESSION['quote_num'] = $quote_num; $_SESSION['total'] = $total; New Page: session_start(); echo $_SESSION['quote_num']; echo $_SESSION['total']; Link to comment https://forums.phpfreaks.com/topic/39946-passing-variables-from-form-results-page-to-another/#findComment-193107 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.