Join Login

 by jermaine - Nov 19, 2012

I followed the training video, and everything works ok, but the only problem is that i do not receive the email in my account.
why is this?

see code below
if ($_POST['parse_var'] == "prayerrequest") {

$emailTitle = 'Prayer Request';
$yourEmail = '';

$emailField = $_POST['email'];
$nameField = $_POST['name'];
$messagelField = $_POST['message'];

$body = <<<EOD
Email: $emailField <br />
Name: $nameField <br />
Message: $messageField <br />


$headers = "From: $emailField\r\n";
$headers .= "content-type: text/html\r\n";
$success = mail ("$yourEmail","$emailTitle","$body","$headers");

$sent = "THANK YOU! Your prayer has been sent.";

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) {; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
} }

<p align="center"><img src="../images/banner.jpg" width="968" height="200" /></p>
<table width="400" border="1" cellpadding="0" align="center">
<th scope="col" align="center">Prayer Request <br /><br />
<form id="prayerrequest" name="prayerrequest" method="post" action="prayer_request.php">
<table width="100%" border="0" cellpadding="3">
<tr bgcolor="#cccccc">
<th width="19%" align="left"scope="col">Name</th>
<th width="81%" scope="col"><label for="name"></label>
<input name="name" type="text" id="name" onblur="MM_validateForm('name','','R','email','','RisEmail','message','','R');return document.MM_returnValue" size="30" maxlength="30" value="<?php print "$namefield"; ?>" /></td>
<td align="left">Email</td>
<td><label for="email"></label>
<input type="text" name="email" id="email" maxlength="50" size="50"value="<?php print "$emailfield"; ?>"/></td>
<tr bgcolor="#cccccc">
<td align="left">Message</td>
<td><label for="message"></label>
<textarea name="message" id="message" cols="45" rows="5"><?php print "$messagefield"; ?></textarea></td>
<td align="right"><input type="reset" name="reset" id="reset" value="Reset" />
<input type="hidden" name="parse_var" id="parse_var" value="prayerrequest" /> <input type="submit" name="Submit" id="Submit" value="Submit" /></td>
<td colspan="2"><?php print "$sent"; ?></td>
<p align="center"><img src="../images/footer.jpg" alt="footer" width="968" height="100" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="255,10,313,29" href="home.html" alt="home" />
<area shape="rect" coords="324,12,412,29" href="#" alt="about us" />
<area shape="rect" coords="429,10,547,29" href="Apostle Whyte.html" alt="The Leaders" />
<area shape="rect" coords="562,10,672,29" href="partnership.html" alt="Partnership" />
<area shape="rect" coords="688,10,760,26" href="automatic_billing.html" alt="automatic giving" />
<area shape="rect" coords="847,12,952,27" href="contact_us.html" alt="Contact Us" />

Joined:Nov 19, 2012
Home About Contact Forum Youtube Privacy Policy
Copyright © 2009-2011 RiverCityGraphix.All Rights Reserved.