Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Problems with $_GET
- Tim Streater
March 8, 2006, 6:32 pm
rate this thread
and inside mypage.phtml I do this:
$absid = $_GET["absid"];
Unfortunately, and I can't easily fix this in the short term, my
"somestring" may contain "absid=456". I think this screws up
mypage.phtml as it then runs with a wrong value of $absid (456 instead
of 123). This is what I suspect is happening, anyway.
I guess PHP is looking at the URL and just scanning from left to right
looking for ?xxx=value and &xxx=value pairs, right? If so, is there any
way to make it ignore subsequent values of xxx?
Re: Problems with $_GET
all as the client can forge it very very easiy. You shoul do some data
checking and error handling to prevent this.
If you are trying to pass multiple values for the same parameter name,
append  to them and they will come in as an array.
You can try parse_url(), but that is probably what php uses to parse
$_GET anyways, so you'd have to write your own function to parse it and
take the first value and ignore the subsequent values.