http://elitetradesmen.com/registration%20form.php?id=7
I'm trying to set up the above page so that the visitor has to complete certain fields. I've managed to make it so that the error message comes up for each field but now even if they complete the field the error message comes up. I'm guessing that i have to add some code at the bottom of my form which says if field completed etc etc but i don't know how to do this bit. What's the code i need?
I also have no idea how to post code in this forum so will just show the relevent bits.
if ($senders_name != "=")
{$error = "1";
$info_error .= $lang_noname . "<br>";}
if ($company != "=")
{$error = "1";
$info_error .= $lang_nocompany . "<br>";}
if ($senders_name != "=")
{$error = "1";
$info_error .= $lang_notrade . "<br>";}
if ($telephone != "=")
{$error = "1";
$info_error .= $lang_notelephone . "<br>";}
{
if ($checkdomain == "yes")
{
$sender_domain = substr($senders_email, (strpos($senders_email, '@')) +1);
$recipient_domain = substr($sendto_email, (strpos($sendto_email, '@')) +1);
if ($sender_domain == $recipient_domain)
{
print "Sorry, you cannot send messages from this domain ($sender_domain)";
exit;
}