Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
how do i validate these form fields
Old 06-30-2009, 06:05 PM how do i validate these form fields
Average Talker

Posts: 15
Trades: 0
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;
}
speed1972 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to how do i validate these form fields
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11766 seconds with 12 queries