Jump to content


Email form problems......

  • Please log in to reply
1 reply to this topic

#1 ryanpaul

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 27 March 2006 - 05:51 AM

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.


Here is my code in my html page:

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

<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>
<table width="877" height="236" border="0" align="center">

<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>

<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">
<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>
<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>
<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>
<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>
<td height="36">&nbsp;</td>
<td height="20">&nbsp;</td>
<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>
<td height="23">&nbsp;</td>
<td><input type="submit" name="Send" value="Send" />
<input name="Cancel" type="reset" id="Cancel" value="Reset" /></td>

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.

#2 Guest_footballkid4_*

  • Guests

Posted 27 March 2006 - 06:15 AM

Your form method is "get", but you are using $_POST on your PHP page to retrieve data

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users