Suchy Posted January 20, 2008 Share Posted January 20, 2008 I am having a problem <?php (isset($_GET["page"]) && is_numeric($_GET["page"])) $current= $_GET["page"]; else $current = 1; echo "page -> " . $_GET["page"] . "<br><br>"; echo "current -> " . $current . "<br><br>"; ?> When the url is like: info.php?page=2 output is : page -> 2 current -> 2 info.php?page=17 output is : page -> 17 current -> 17 The problem is with url's like this: info.php?user=anna?page=2 (or any other page) output is always: page -> current -> 1 How can this bug be fixed? Link to comment https://forums.phpfreaks.com/topic/86962-solved-_get-help/ Share on other sites More sharing options...
pocobueno1388 Posted January 20, 2008 Share Posted January 20, 2008 This format is wrong: info.php?user=anna?page=2 It should be like this info.php?user=anna&page=2 Link to comment https://forums.phpfreaks.com/topic/86962-solved-_get-help/#findComment-444631 Share on other sites More sharing options...
Destruction Posted January 20, 2008 Share Posted January 20, 2008 Multiple $_GET parameters are separated by & Example: info.php?user=anna&page=2 Dest Link to comment https://forums.phpfreaks.com/topic/86962-solved-_get-help/#findComment-444633 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.