doddsey_65 Posted October 6, 2010 Share Posted October 6, 2010 my index.php file includes different files depending on the get value. all of them work except this one: elseif (isset($_GET['forum']) && $_GET['child']) { include 'modules/pages/children.php'; } when i point my browser to index.php?forum=1&child=1 it stays on the same page. Do i need to include something else when getting a url with 2 $_GETs? Link to comment https://forums.phpfreaks.com/topic/215262-another-_get-question/ Share on other sites More sharing options...
litebearer Posted October 6, 2010 Share Posted October 6, 2010 not sure but perhaps... elseif (isset($_GET['forum']) && isset($_GET['child'])) { Link to comment https://forums.phpfreaks.com/topic/215262-another-_get-question/#findComment-1119568 Share on other sites More sharing options...
Adam Posted October 6, 2010 Share Posted October 6, 2010 Your code should work, given that just $_GET['child'] in the IF expression will check if it's true/1. Try adding some debugging: elseif (isset($_GET['forum']) && $_GET['child']) { exit('foo'); include 'modules/pages/children.php'; } If you don't see "foo" then you know the problem is with your logic. A possible problem could be if you have just isset($_GET['forum']) in a previous expression, then obviously this else-if expression won't ever get evaluated. Link to comment https://forums.phpfreaks.com/topic/215262-another-_get-question/#findComment-1119581 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.