tags:

views:

52

answers:

3

Hey, i am currently creating a pagination script using php and jquery and for some reason can't display the $_GET that im trying to grab.

There is no form, but looking at the firebug console I get a url like this:

pagination.php?id=category

Just wondering how I can get that 'category' and just echo it out.

+3  A: 

doesn't $_GET['id'] do it?

Andrey
+3  A: 

Try:

echo $_GET['id'];

Just in case that "category" is a URL, try to encode it, otherwise it will not populate correctly; and finally, don't use variables over 100 characters in length.

Kyle Rozendo
+1  A: 
echo $_GET['id'];

also, be sure to sanitize user input before doing anything with it.

GSto