dondaddy
11-05-2008, 07:39 PM
Am new to PHP programming, and am faceing this problems:
I need urgent assistance to this php code (contact.php) to submit form values.
below are both the CONTACT.HTML code and CONTACT.PHP codes.
CONTACT.HTML CODE
<form name="form1" method="post" action="contact.php">
<table width="92%" height="339" border="0" align="center">
<tr>
<td width="28%" height="30"><div align="right" class="style2">First
Name</div></td>
<td width="72%"><div align="left">
<input name="First _Name" type="text" id="First _Name">
</div></td>
</tr>
<tr>
<td height="40"><div align="right" class="style2">Last
Name</div></td>
<td> <div align="left">
<input name="Last_Name" type="text" id="Last_Name">
</div></td>
</tr>
<tr>
<td height="34"><div align="right" class="style2">E-mail</div></td>
<td> <div align="left">
<input name="Email" type="text" id="Email">
</div></td>
</tr>
<tr>
<td height="44"><div align="right" class="style2">Phone
</div></td>
<td> <div align="left">
<input name="Phone" type="text" id="Phone">
</div></td>
</tr>
<tr>
<td height="47"><div align="right" class="style2">Subject</div></td>
<td> <div align="left">
<input name="Subject" type="text" id="Subject">
</div></td>
</tr>
<tr>
<td align="right" valign="top"><div align="right"><span class="style2">message</span></div></td>
<td><textarea name="Message" cols="40" rows="6" id="Message"></textarea></td>
</tr>
</table>
<br>
<p align="center"> </p>
<p align="center">
<input type="submit" name="Submit" value="Submit">
<input name="Reset" type="reset" id="Reset" value="Reset">
</p>
</form>
CONTACT.PHP CODE
<?php
$error_occured = "no";
if (isset($_POST['submit'])){
$First_Name = $_POST['First_Name']; // getting the value of first name
$Last_Name = $_POST['Last_Name']; // getting the value of last name
$Email = $_POST['Email']; // getting the value of E-mail
$Phone = $_POST['Phone']; // getting the value of Phone number
$Subject = $_POST['Subject']; // getting the value of Subject
$Message = $_POST['Message']; // getting the value of user Message
}
if($error_occured=="no") {
$mailto = "info@charismaticbelieverschurchinternational.com";
$email_from = email_address;
echo "your message has been delivered successfully. Thank you.";
}
?>
WHEN EVER I CLICK THE SUBMIT BUTTON I RECIEVE THE DELEVERY MESSAGE BUT I DON'T GET THE MESSAGE ON THE WEB MAIL.
THANKS
I need urgent assistance to this php code (contact.php) to submit form values.
below are both the CONTACT.HTML code and CONTACT.PHP codes.
CONTACT.HTML CODE
<form name="form1" method="post" action="contact.php">
<table width="92%" height="339" border="0" align="center">
<tr>
<td width="28%" height="30"><div align="right" class="style2">First
Name</div></td>
<td width="72%"><div align="left">
<input name="First _Name" type="text" id="First _Name">
</div></td>
</tr>
<tr>
<td height="40"><div align="right" class="style2">Last
Name</div></td>
<td> <div align="left">
<input name="Last_Name" type="text" id="Last_Name">
</div></td>
</tr>
<tr>
<td height="34"><div align="right" class="style2">E-mail</div></td>
<td> <div align="left">
<input name="Email" type="text" id="Email">
</div></td>
</tr>
<tr>
<td height="44"><div align="right" class="style2">Phone
</div></td>
<td> <div align="left">
<input name="Phone" type="text" id="Phone">
</div></td>
</tr>
<tr>
<td height="47"><div align="right" class="style2">Subject</div></td>
<td> <div align="left">
<input name="Subject" type="text" id="Subject">
</div></td>
</tr>
<tr>
<td align="right" valign="top"><div align="right"><span class="style2">message</span></div></td>
<td><textarea name="Message" cols="40" rows="6" id="Message"></textarea></td>
</tr>
</table>
<br>
<p align="center"> </p>
<p align="center">
<input type="submit" name="Submit" value="Submit">
<input name="Reset" type="reset" id="Reset" value="Reset">
</p>
</form>
CONTACT.PHP CODE
<?php
$error_occured = "no";
if (isset($_POST['submit'])){
$First_Name = $_POST['First_Name']; // getting the value of first name
$Last_Name = $_POST['Last_Name']; // getting the value of last name
$Email = $_POST['Email']; // getting the value of E-mail
$Phone = $_POST['Phone']; // getting the value of Phone number
$Subject = $_POST['Subject']; // getting the value of Subject
$Message = $_POST['Message']; // getting the value of user Message
}
if($error_occured=="no") {
$mailto = "info@charismaticbelieverschurchinternational.com";
$email_from = email_address;
echo "your message has been delivered successfully. Thank you.";
}
?>
WHEN EVER I CLICK THE SUBMIT BUTTON I RECIEVE THE DELEVERY MESSAGE BUT I DON'T GET THE MESSAGE ON THE WEB MAIL.
THANKS