Jump to content

[SOLVED] $_GET Help


Suchy

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.