MartiniMon
asked on
$_GET not getting all params from Querystring
file.php?act_del=1&id_file acc=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" }
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" }
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ABSOLUTELY
This is a rudimentary PHP that's why I am so astounded.
This is a rudimentary PHP that's why I am so astounded.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you sure that the initial string was not something like
file.php?act_del=1&id_ fileacc=57 &idx_userr rsz=2
because this would display like
file.php?act_del=1&id_file acc=57&idx _userrrsz= 2
file.php?act_del=1&id_
because this would display like
file.php?act_del=1&id_file
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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_userr rsz=2
with a space before the first = would become
file.php?act_del_=1&id_fil eacc=57&id x_userrrsz =2
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_userr
with a space before the first = would become
file.php?act_del_=1&id_fil
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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_de l1=1&id_fi leacc=56&i dx_userrrs z=2'>Link< /a>
no spaces or url encoding
note also that changing the param name no longer works either.
~~odd~~
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Fine with me.
I (almost) never argue about points!
Whatever you think best.
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
ASKER
thanks all!
ASKER
Thanks for the effort!
ASKER
If I change the following param (and only this) from
act_del=1
TO
act_del1=1
Then the script works as expected.