I have searched for this answer on Google and Youtube but have not found an answer.
I have created a very simple contact form on my website.
(http://www.torontoimc.com/contact)
I have attached a seperate PHP file to process the contact form elements.
When someone sends me an inquiry through the form on my site, I'm receiving all of the information except the person's email address input section info.
It's very important that I receive that email address otherwise I won't be able to reply to whom ever sent it to me.
I have tried setting the form to be sent to my gmail and outlook email but it just sends it as:
It just shows that the sender's email address as some random name "@hemi.websitewelcome.com"
I'm not sure if this is a server side issue or an issue with PHP file.
I have attached the code for both my Contact form and PHP file.
Here is the contact form code:
<form action="formprocess.php" method="post" name="contact">
<fieldset>
<label>First Name</label>
<input name="first_name" type="text"/>
<label>Last Name</label>
<input name="last_name" type="text"/>
<label>Email</label>
<input name="email_add" type="text"/>
<label>Please write your inquiry below.</label>
<textarea name="message" rows="15" cols="40">
</textarea>
<input type="submit" name="submit" id="submit" value="Submit"/>
<input type="reset" name="reset" id="reset" value="Reset"/>
</fieldset>
</form>
Here is the php code:
<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email_add = $_POST['email_add'];
$message = $_POST['message'];
$to = "[email protected]";
$subject = "Inquiry for TorontoIMC";
mail ($to, $subject, $message, "From: " . $first_name . $last_name . $email_add);
header('Location: thanks.html');
exit();
?>
I apologize if this is a repeat question but I'm a newbie to php and have not really been able to find an answer, if someone can please help me out, I would really appreciate it.
Thanks,
Latish Vohra