first=value
first=value&arr[]=foo+bar&arr[]=baz
How can I use PHP to validate a query string, which is a sequence of
[name]=[value]&
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I can’t say I understand what you are asking, but if we are talking about the specific value above:
If you are asking if you can validate whether a query string is in a usable format .. well you can’t, really. There is large variety of possible query strings and you can really put in whatever you want. It is up to you to check if the values you are expecting are set and checking whether the data in them is usable for your purposes.