Link to home
Start Free TrialLog in
Avatar of MartiniMon
MartiniMon

asked on

$_GET not getting all params from Querystring

file.php?act_del=1&id_fileacc=57&idx_userrrsz=2

only last param idx_userrrsz is gettable;...
at top of page:
echo "GET: <BR>";
var_dump($_GET);
Output:
GET:
array(1) { ["idx_userrrsz"]=> string(1) "2" }
Avatar of MartiniMon
MartiniMon

ASKER

Note:

If I change the following param (and only this) from
act_del=1
TO
act_del1=1

Then the script works as expected.
SOLUTION
Avatar of Beverley Portlock
Beverley Portlock
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ABSOLUTELY

This is a rudimentary PHP that's why I am so astounded.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are you sure that the initial string was not something like

file.php?act_del=1&amp;id_fileacc=57&idx_userrrsz=2

because this would display like

file.php?act_del=1&id_fileacc=57&idx_userrrsz=2

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have tried several variations and I cannot get it to behave as you describe. Is the faulty page accessible on the web?

PHP will 'mung' data in that it will change anything it does not like into an underscore so

file.php?act_del =1&id_fileacc=57&idx_userrrsz=2

with a space before the first = would become

file.php?act_del_=1&id_fileacc=57&idx_userrrsz=2
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Running the script above yields this for the QS

QUERY_STRING : idx_userrrsz=2

I am using a dynamic link but have hard coded this one for testing this issue.
here is the link text coped right from the rendered source:

<a href='userFileAccess_alt2.php?act_del1=1&id_fileacc=56&idx_userrrsz=2'>Link</a>

no spaces or url encoding
note also that changing the param name no longer works either.
~~odd~~
I'm inclined to think you have something else going on.  It's works fine on 4 different servers that I can check right now.  Are you using 'rewrite' code in your '.htaccess' file that may be corrupting it?
Yes. it's odd, but before we spend any more time on guessing about it, please post the information requested at ID:36970002.  That will probably be enough to find the problem.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Fine with me.
I (almost) never argue about points!

Whatever you think best.
I have enough points to orbit Saturn, so I am happy with whatever you want to do.  But about this... stared at it for a couple of hours -- next time just post the code and data here and you can get a set of fresh eyes on the problem within minutes!  All the best, ~Ray
thanks all!
Thanks for the effort!