leest Posted June 12, 2008 Share Posted June 12, 2008 i have a job board site where the user can choose jobs by location and category, which are selected by drop down menus. the selected information is then sent via a GET form. on the results page i get the results fine and display the correct job vacancies. On the same page as the results page i have a login form, now this is where my problems start, as soon as a user logs in all the results are returned. Now i have tried to register the Get vars as sessions and then using the isset command but it doesn't seem to work. below is a copy of the code and any guidance would be appreciated. session_start(); if(isset($_GET['category'],$_GET['location'] )) { $category = $_GET["category"] ; $location = $_GET["location"] ; $_SESSION['category']= $_GET['category']; $_SESSION['location']= $_GET['location']; } $category = $_SESSION['category']; $location = $_SESSION['location']; Quote Link to comment Share on other sites More sharing options...
jonsjava Posted June 12, 2008 Share Posted June 12, 2008 your code works fine. Dumb question (but gotta ask): do you have session_start in the other pages that use this data? Quote Link to comment Share on other sites More sharing options...
leest Posted June 12, 2008 Author Share Posted June 12, 2008 thanks for the reply, well once someone has logged in it runs a login process page and then comes straight back to this same page, i do have session start on the process page but maybe that is where my problem lies??? Quote Link to comment Share on other sites More sharing options...
jonsjava Posted June 12, 2008 Share Posted June 12, 2008 add session_start(); at the top of the page, then give it a try. Quote Link to comment Share on other sites More sharing options...
leest Posted June 12, 2008 Author Share Posted June 12, 2008 I have done that but i am still getting the same problem, the first query works fine, but then if you login the page shows all results Quote Link to comment 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.