Afficher un message
Vieux 20/06/2008, 21h11   #2
Raistlin Majere
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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?


  Réponse avec citation
 
Page generated in 0,05656 seconds with 9 queries