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? Quote Link to comment 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 Quote Link to comment 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 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.