Hello, I've got some user input going into file.php?l=
I only want to allow A-Za-z0-9 spaces, commas, and curved brackets,
and if anything else is there, give an error.
At the moment it does stop $ or ^ or & ...
but not *,
also it doesn't stop r% or "asa or a£a
which I would like it to.
Any help would be greatly appreciated, thanks.
$expr = '/^[^A-Za-z0-9()-, ]+$/';
$p = preg_match($expr,stripslashes(urldecode($_GET['l'])));
if($p==0) {
//all is fine, go ahead
}
else {
//error, get out of there
}Hello.
I currently have an array of ~2500 items, each one of length about 10characters, just A-Za-z0-9, no extra characters.
Here's the pseudo-code of what I want:
Okay, now I have another question.
I've added the code:
to the .htaccess file, but it isn't quite working as I would expect
I have now solved the problem, so I'll quickly explain the problem and solution
The mission:
Trying to make
http://domain.ext/alpha/intelligence/world/capital/rwanda
actually display the file stored at:
I've submitted a design for critique at threadless,
http://www.threadless.com/critique/7942/Wa...lors_Separately
and would love to know what you think.
You can leave your messages there, or here if you don't have an account.
Cheers.