Jump to content

Amphit

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Everything posted by Amphit

  1. I wrote this code and I keep getting Parse error: syntax error, unexpected $end in the last line <?php $subject = 'Registration'; $fname = $_POST['fname']; $lname = $_POST['lname']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $phone = $_POST['phone']; $email = $_POST['email']; $mortgage = $_POST['mortgage']; $comments = $_POST['comments']; if($fname == ""){ echo 'Please fill out a First Name'; exit(); }elseif($lname == ""){ echo 'Please fill out a Last Name'; exit(); }elseif($address == ""){ echo 'Please fill out an Address'; exit(); }elseif($city == ""){ echo 'Please fill out a City'; exit(); }elseif($state == ""){ echo 'Please fill out a State'; exit(); }elseif($zip == ""){ echo 'Please fill out your Zip Code'; exit(); }elseif($phone == "") { echo 'Please fill out a Telephone Number'; exit(); }elseif($mortgage == "") { echo 'Please fill out a Mortgage Company'; exit(); }else{ $to = 'amphit@live.com'; $mailfrom = '$email'; $header = "from: $fname $lname <$mail_from>"; $detail = "First name - $fname <br> Last Name - $lname <br> Address - $address <br> City - $city <br> State - $state <br> Zip - $zip <br> Phone - $phone <br> Email - $email <br> Mortgage - $mortgage <br> Comments - $comments"; $send_mail=mail($to,$subject,$detail,$header); if($send_mail){ echo "We've recived your contact information"; } else { echo "ERROR"; } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.