As explained already, not a good idea :)
Also, if someone makes a copy of your form and excludes one of the fields,
then it won't be set in POST at all.
Keep an array of the fields you have in the form. I choose to set the field
as the key, and then for the value either 1 (required) or 0 (not re
> That's generally not a good idea because depending on the type of control
> empty input fields will not be available in the $_POST array (e.g.
> unchecked checkboxes are _not_ sent by the browser).
>
> You should rather have a list of input variables that need to be filled
and
> compare $_POST ag
At 20:26 14.03.2003, drparker said:
[snip]
>I'm running this script to make sure all fields are filled in on a form:
>
>foreach($_POST as $p)
>{
> if(!$p)
> {
> header("Location: signup.php?error=3");
> exit();
> }
>}
>
>But I need to exclude one field on
3 matches
Mail list logo