Please enter full name
"; } $email= trim($_POST["email"]); if( strlen( $email )<10 ){ ++$error; echo "

Please enter Email
"; } $phone= trim($_POST["phone"]); if(!is_numeric( $phone )){ ++$error; echo "

Please enter phone number. Only numbers allowed.
"; } if( !isset( $_POST["call"] ) ){ ++$error; echo "

Please tick at least one option for mode of contact
"; }else{ $call= $_POST["call"]; $callMode=""; foreach( $call as $v ){ $callMode.="$v,"; } } if( $error==0 ){ $str="$name,$email,$phone,$callMode\r\n"; $fp= fopen( "mailContact.txt", "a" ); fwrite( $fp, $str ); fclose( $fp ); echo "

Thank you, your details have been submitted. I will contact you soon

"; }//no error }//submit ends ?>

Name

Email

Phone

How would you like to be contacted:

Text
Email
Call