Jump to content

[SOLVED] Im doing something wrong


bellyboy22

Recommended Posts

I am trying to have a form send information to my email using php and I am not getting it right.

 

 

Godaddy is saying my php is wrong.

 

<?php 
if(isset($_POST['submit'])) { 
$firstname = $_POST['firstname'] ;
$lastname = $_POST['lastname'] ;
$address = $_POST['address'] ;
$city = $_POST['city'] ;
$state = $_POST['state'] ;
$zip = $_POST['zip'] ;
$primaryphone = $_POST['primaryphone'] ;
$workphone = $_POST['workphone'] ;
$otherphone = $_POST['otherphone'] ;
$emailaddress = $_POST['emailaddress'] ;
$infoSchooling = $_POST['infoSchooling'] ;
$infoYear = $_POST['infoYear'] ;
$infoReference = $_POST['infoReference'] ;
$infoCallTime = $_POST['infoCallTime'] ;
$recievemail = "chubb.gregkilian.com" ;
$mailsubject = "I am interested in coming to chubb" ;

$body = "First Name: $firstname\n Last Name: $lastname\n Address: $address\n City: $city\n State: $state\n Zip: $zip\n PrimaryPhone: $primaryphone\n Work Phone: $workphone\n Other Phone: $otherphone\n Email Address: $emailaddress\n I am a $infoSchooling\n Hs Grad_Ged Year: $infoYear\n I heard from you through the $infoReference\n You can call me around $infoCallTime" ;    

echo "Thank you $firstname for your email. We will get back to you as soon as possible" ; 
mail($recievemail, $mailsubject, $body);
} else { 
echo "error go back"; 
} 
?>

 

 

can anyone tell me what I'm doing wrong

Link to comment
https://forums.phpfreaks.com/topic/120655-solved-im-doing-something-wrong/
Share on other sites

Thanks

Crayon Violent

 

 

I thought I was going crazy and my php sucked.. It was because i put. instead of @ in the email slot

 

I got into the habit of writing the url that I guess it got put into the code instead of a email address.

 

Thank you all for your help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.