Jump to content

Archived

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

ryanpaul

Email form problems......

Recommended Posts

I have been trying to get this right for ages, its probably really simple but as I am
new to php I ask that you forgive me.....
I have passed the point of reason after spending large amounts of time on tutorials
and examples.

It sends an email but with no info from the form, and also links to the thank you page.

PLEASE HELP?!?!

Here is my code in my html page:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Access All Areas - Coming Soon!</title>
</head>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

<body>
<div align="center">
<p><font size="3" face="Georgia, Times New Roman, Times, serif"><strong><br />
</strong><font size="3" face="Georgia, Times New Roman, Times, serif"><font color="#000000" size="2" face="Serpentine">Coming Soon.........</font></font> <font color="#CA001C" face="Serpentine">AccessAllAreas.ae</font></font> </p>
</div>
<table width="877" height="236" border="0" align="center">

<tr>
<td width="367" rowspan="3"><img src="aaa logo.jpg" alt="AAA" width="318" height="226" align="absmiddle" /></td>
<td width="500" height="228"><img src="Intro.jpg" alt="intro" width="500" height="189" /></td>
</tr>

<tr></tr>
<tr></tr>
</table>
<p align="center"><font color="#CD001B" size="1" face="Serpentine">Postal: P.O. Box 25839, Dubai, United Arab Emirates - Phone: +97143405868 - Fax: +97143405879</font></p>
<p align="center">&nbsp;</p>
<p align="center"><font color="#333333" size="2" face="Serpentine"> Contact</font></p>
<form name="form1" method="get" action="contact.php">
<table width="463" height="220" border="0" align="center">
<tr>
<td width="197" height="22"><div align="right"><img src="Name.jpg" alt="From" width="143" height="12" /></div></td>
<td width="250" height="22" bordercolor="#FFFFFF"><input name="From" type="text" id="From" size="30" /></td>
</tr>
<tr>
<td height="22"><div align="right"><img src="Email.jpg" alt="Email" width="143" height="12" /></div></td>
<td height="22" bordercolor="#FFFFFF"><input name="Email" type="text" id="Email" size="30" /></td>
</tr>
<tr>
<td height="22"><div align="right"><img src="Phone.jpg" alt="Phone" width="143" height="12" /></div></td>
<td height="22" bordercolor="#FFFFFF"><input name="Phone" type="text" id="Phone" size="30" /></td>
</tr>
<tr>
<td height="32"><div align="right"><img src="Message.jpg" alt="Message" width="143" height="12" /></div></td>
<td rowspan="3"><textarea name="Msg" cols="29" rows="6" wrap="physical" id="Msg"></textarea></td>
</tr>
<tr>
<td height="36">&nbsp;</td>
</tr>
<tr>
<td height="20">&nbsp;</td>
</tr>
<tr>
<td height="20">&nbsp;</td>
<td><font size="3" face="Georgia, Times New Roman, Times, serif"><font color="#CA001C" size="1" face="Serpentine">Please fill in all fields </font></font></td>
</tr>
<tr>
<td height="23">&nbsp;</td>
<td><input type="submit" name="Send" value="Send" />
<input name="Cancel" type="reset" id="Cancel" value="Reset" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>



And here is the php code:

<?
$From = $_POST['From'] ;
$Email = $_POST['Email'] ;
$Phone = $_POST['Phone'] ;
$Msg = $_POST['Msg'] ;

mail( "xxxxx@xxxxxxx.com", "Website Contact Form", "$Msg. Phone: $Phone", "From: $From" );
header( "Location: [a href=\"http://www.xxxxxxxxx.com/sent"\" target=\"_blank\"]http://www.xxxxxxxxxxx.com/sent"[/a] );
?>

Thanks guys.

Share this post


Link to post
Share on other sites
Guest footballkid4
Your form method is "get", but you are using $_POST on your PHP page to retrieve data

Share this post


Link to post
Share on other sites

×

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.