Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Quick contact page help!!!!!

Discussion in 'Website Coding & Programming Forum:' started by Fallak, Nov 9, 2012.

  1. Fallak

    Fallak New Member

    Hi, for some reason on my website Tyreseal Global the contact form doesnt work.. It comes up with an error..

    The code for the page is:

    if(!$_POST) exit;
    $email = $_POST['email'];
    //$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'INVALID EMAIL ADDRESS';
    if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){
        $error.="Invalid email address entered";
    if($errors==1) echo $error;
        $values = array ('name','email','message');
        $required = array('name','email','message');
        $your_email = "";
        $email_subject = "New Message: ".$_POST['subject'];
        $email_content = "new message:\n";
        foreach($values as $key => $value){
            if ($key != 'subject' && $key != 'company') {
              if( empty($_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; }
            $email_content .= $value.': '.$_POST[$value]."\n";
        if(@mail($your_email,$email_subject,$email_content)) {
            echo 'Message sent!'; 
        } else {
            echo 'ERROR!';
  2. Fallak

    Fallak New Member

    Found the error it was where it says
        $your_email "";
    I had to change that..

Share This Page