Jump to content


form fields


1 reply to this topic

#1 Benbow08

    Young Padawan

  • Members
  • Pip
  • 63 posts

Posted 26 September 2006 - 10:37 AM

daniel benbow in the house

Edited by Benbow08, 06 June 2007 - 08:18 AM.


#2 Headshot

    Young Padawan

  • Members
  • Pip
  • 104 posts
  • Gender:Male

Posted 26 September 2006 - 01:07 PM

When Submitted:

$errors = array();

		if(empty($_POST['selectTitle']) || trim($_POST['selectTitle']) == "")
		{
		$errors[] = "You forgot the Title";
		}

		if(empty($_POST['txtInitial']) || trim($_POST['txtInitial']) == "")
		{
		$errors[] = "You forgot the Inital field.";
		}

		if(count($errors) > 0)

		{
		foreach($errors as $err)
{
		echo "<center><font color='red'>";
		echo $err . "<br /></font></center><br />";
}
}

Keep on going like that with all the fields you wanna check





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users