Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
Linek98 is on a distinguished road
 
Posts: 3
Join Date: Oct 2008
Default [PHP] $_GET problem... - 10-19-2008, 11:07 PM

When I'm trying to send more then 1 variable via url adress like

somesite/file.php?x=5&y=7

Second variable does NOT exists....
I tryed already with ' & ', print_r(&_GET), isset(&_GET)... and damn... nothing is working. I guess it's all about configuration. Anyway, know what should I do to make it working?

BTW
When I change variables like y=7&x=5 then 'y' exists but x doesn't..
Reply With Quote
(#2 (permalink))
Old
Member
Devastator is on a distinguished road
 
Posts: 50
Join Date: Aug 2008
Default 10-22-2008, 01:01 AM

There is no &_GET, you should be using $_GET['y'] or $_GET["y"]

I take it "$_GET" by itself is just returning whatever the first variable is, but again, use the aforementioned method for best results. A user can easily mess around with GET type variables, so you need to ensure that the values coming in to the server are valid.
Reply With Quote
(#3 (permalink))
Old
Junior Member
Linek98 is on a distinguished road
 
Posts: 3
Join Date: Oct 2008
Default 10-22-2008, 08:47 AM

Yea I know it is $_GET not &_GET I just typed it wrong in my post....

I solved it anyway just had to use urlencode.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com