floriske Posted June 14, 2007 Share Posted June 14, 2007 Maybe stupid question, but my problem is the following: I've build website in php over year ago, I only use the website once a year for an event... It ran smoothly last year but is giving troubles now.. Problem is that for navigation purposes I define variable in address bar for navigation purposes eg. in address bar I state "http:\\....\index.php?var=edit" in my index.php i then have if($var == 'edit') {........ } elseif($var =="view") {......... } in the past in ran the code then between the first two brackets when i stated "?var=edit" in the address bar and when I typed ?var="view" in the address bar in ran the code included between the second two brackets.... Last year this ran smoothly and I could easily define variables in the address bar for website navigation for whatever reason this type of navigation does not work anymore, anybody has a clue, why this does not work anymore; I Suspect it to be a change of settings by my webhoster in the php configuration; that's the only thing I can come up with. But due to time management don't have the time to go search the web in detail.... Does anybody have A clue & quick fix for my problem??? Thanx Floris Quote Link to comment https://forums.phpfreaks.com/topic/55612-solved-problem-php-using-if-function-address-bar-for-navigation/ Share on other sites More sharing options...
Full-Demon Posted June 14, 2007 Share Posted June 14, 2007 Instead of $var use $_GET['var'] FD Quote Link to comment https://forums.phpfreaks.com/topic/55612-solved-problem-php-using-if-function-address-bar-for-navigation/#findComment-274790 Share on other sites More sharing options...
floriske Posted June 14, 2007 Author Share Posted June 14, 2007 Thanx! works again!!! just for my own interest, is it due to changed php setting that latter method does not work anymore??? Quote Link to comment https://forums.phpfreaks.com/topic/55612-solved-problem-php-using-if-function-address-bar-for-navigation/#findComment-274798 Share on other sites More sharing options...
Full-Demon Posted June 14, 2007 Share Posted June 14, 2007 I think yeah. The way I explained is the right way. I think earlier php versions could use your method too. FD Quote Link to comment https://forums.phpfreaks.com/topic/55612-solved-problem-php-using-if-function-address-bar-for-navigation/#findComment-274799 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.