Edited by Benbow08, 06 June 2007 - 08:18 AM.
form fields
Started by Benbow08, Sep 26 2006 10:37 AM
1 reply to this topic
#1
Posted 26 September 2006 - 10:37 AM
daniel benbow in the house
#2
Posted 26 September 2006 - 01:07 PM
When Submitted:
Keep on going like that with all the fields you wanna check
$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
