Hi Friends,
I have a simple HTML form and simple PHP code which sends the filled information at my email address. Now, I am trying to get Page URL and Page Title at my email while submitting a form alongwith the info filled by user.
Here is my HTML form:
Here is the emailus.php code:
I will appreciate if anyone can help me on this...
Thanks
Deepak
I have a simple HTML form and simple PHP code which sends the filled information at my email address. Now, I am trying to get Page URL and Page Title at my email while submitting a form alongwith the info filled by user.
Here is my HTML form:
Code:
<form action="emailus.php" method="POST" name="Email_Submit" class="divtext">
<table width="400" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="47%" valign="top">First Name:</td>
<td width="53%" valign="top">
<input name="FirstName" type="text" id="Contact_FName" size="20"></td>
</tr>
<tr>
<td valign="top">Last Name: </div></td>
<td valign="top">
<input name="LastName" type="text" id="Contact_LName" size="20"></td>
</tr>
<tr>
<td valign="top">Your E-mail:</td>
<td valign="top">
<input name="Email" type="text" id="Contact_Email" size="20"></td>
</tr>
<tr>
<td valign="top">Your Question:</td>
<td valign="top">
<textarea name="Question" rows="5" id="Question" cols="20"></textarea></td>
</tr>
<tr>
<td valign="top"><input name="Submit" type="submit" value="Submit"></td></tr>
</form>
Code:
<? $FirstName = $_POST['FirstName']; $LastName = $_POST['LastName']; $email = $_POST['Email']; $question = $_POST['Question']; $message="First Name: $FirstName \n Last Name: $LastName \n Email: $email \n Your Question: $question \n "; mail( "deepaks85@gmail.com", "Email Us Form Submission from", "Message: $message", "From: $email" ); header( "Location: http://www.mydomain.com/thanks.html"); ?>
Thanks
Deepak
Comment