Hey I'm designing a website for a business, and I'm having trouble with one of the pages and I was wondering if anyone could give me a hand. I'm pretty decent and design and basic coding, but I'm completely lost when it comes to PHP, so my question will probably be pretty simple.
This is the questions page: link
Basically I copied one of those contact form codes from one of those code websites, but I'm having trouble with the customization.
This is the code I used:
<?php
// Contact subject
$subject ="$subject";
// Details
$message="$detail";
// Mail of sender
$mail_from="$customer_mail";
// From
$header="from: $name <$mail_from>";
// Enter your email address
$to ='test@ivyapphelp.com';
$send_contact=mail($to,$subject,$message ,$header);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "Thank you, message was sent.";
}
else {
echo "ERROR";
}
?>
There are two things that I want to add. First, I want to add in the subject line of the email that it came from the question form. So I understand that there's a line for "$header="from: $name <$mail_from>";" Is there a way I can also add "IvAppHelp Question:" before the $name? Does it have something to do with 'echo' or something?
I also need to add an input box for "hometown" to the questions form. Do I set up another variable for $hometown and place it where the $detail is?
I'm sorry, i probably sound like a complete idiot, but I never gave the time to learn php. I know I really should, but I'm lazy. Thank you for anyone who helps me out.
-RAWR!