Re: GET method... screwups
| From: | Ed Vul | Date: | Mon, 24 Jul 2000 16:17:56 +0000 |
| Subject: | Re: GET method... screwups | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7910@lists.php.net to get a copy of this message | ||
See... thats just it, the url string gets screwed up because some of those
weird characters are normally used in get statements..
like & for instance
so if a variable 'blah' equalled 'free&b'
then the get statement would be
phpscript.php?blah=free&b
and it would assume that b is the name of another variable.
It gets screwed up before it gets to the PHP...
Thanks
Ed
<scottrus@ipass.net> wrote in message
news:20000721200140.A31697@ipass.net...
> You might want to build an array of 'weird chars' and then loop through
> the array and verify that those chars are not in your get statment.
>
> If they are send the user to a 'weird chars detected' error page and have
> them go back and renter the data again. You cat get the entire string from
> the QUERY_STRING Apache Environment I think.
>
> -- Scott
>
> On Fri, Jul 21, 2000 at 04:27:55PM -0700, Ed Vul wrote:
> > I have a form that a user fills in, and I _have_ to pass it via GET in
the
> > url....
> > so if a user enters some extraordinarily funky characters, The fields
after
> > that field are screwed up...
> > Now when i recieve fields normally, I do an ereg_replace (as people so
> > kindly helped me with earlier) and that becomes all good and oracle
> > friendly...
> > but how can I prevent people from entering weird characters into the
field
> > so that the url doesnt get screwed up?
> >
> > Any help would be pachy keen
> > Thanks
> > Ed
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> Scott
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>