[thelist] Form validation function in PHP

John Corry webshot at members.evolt.org
Sat Jun 8 21:07:01 CDT 2002


it's what you're passign the function as an argument...
"\$myvar"...that is a string, not a form input field variable.

Try doing it like this
echo filled($_POST["field_name"]);

or, loop through all the $_POST elements to validate the whole form.

foreach ($_POST as $field)
	{
	if (filled($field) == false)
		{
		// output an error message
		}
	}

hth,
John Corry
Neon Cowboy Design
http://www.neoncowboy.com
mail : john at neoncowboy.com
phone : 808.572.8494




More information about the thelist mailing list