Re: regexp to match simple text not working
// there is too
if (!validate($subject, "subject", VALID_SUBJECT, $subject2, "in")) {
header ("Location: create.php");
On Jun 20, 4:08pm, Raistlin Majere <pedbe...@gmail.com> wrote:
> // there is
>
> define('VALID_MESSAGE', '/^[a-zA-Z0-9 ,.!?\n]{1,10000}$/');
>
> // there is
>
> function validate($variable, $name, $valid, $name2, $inornot)
>
> // there is
>
> if (!preg_match($valid, $variable)) {
> $_SESSION["trying"]="The ".$name." is invalid!";
> return false;
>
> }
>
> // it accepts
>
> testtesttesttesttesttest
>
> // it refuses
>
> testtest
> testtest
> testtest
>
> Why?
|