function valid() { if (document.form1.name.value == "") { alert("Please enter a value for the \"Name\" field."); document.form1.name.focus(); return ; } if (document.form1.email.value != "") { if ( document.form1.email.value.indexOf (\'@\', 0) == -1 || document.form1.email.value.indexOf (\'.\', 0) == -1 ) { alert("please enter a valid e-mail"); document.form1.email.focus(); return; } } else { alert("please enter a valid e-mail"); document.form1.email.focus(); return; } if (document.form1.country.value == "") { alert("Please enter a value for the \"Country\" field."); document.form1.country.focus(); return ; } if (document.form1.message.value == "") { alert("Please enter a value for the \"message\" field."); document.form1.message.focus(); return ; } else document.form1.submit(); } '; $HTML = '


Use this form to send any comments and suggestions:

Name:
Email:
Country:
Message:
'; if ($_POST['sendmsg']==true) { $name=$_POST['name']; $email=$_POST['email']; $country=$_POST['country']; $message=$_POST['message']; $HTML = '


Thank you for your message. It will be processed soon. homepage

'; $to="admin@cepcod.org"; $from="Website Contactus"; $subject="Contact Us"; $content = "Name: $name\n"; $content .= "Email: $email\n"; $content .= "Country: $country\n"; $content .= "Message: $message\n"; mail($to,$subject,$content,$from); } _GetTemplate(); ?>