PDA

View Full Version : form help



Jon101
11-05-2007, 02:01 AM
Heres the php end of the form:



<?php
Error_Reporting(E_ALL & ~E_NOTICE);

while ($request = current($_REQUEST)) {
if (key($_REQUEST)!='jon101@optonline.net') {
$pre_array=split ("&777&", $request);

$post_vars[key($_REQUEST)][0]=preg_replace ("/<[^>]*>/", "", $pre_array[0]);
$post_vars[key($_REQUEST)][1]=preg_replace ("/<[^>]*>/", "", $pre_array[1]);
}
next($_REQUEST);
}



reset($post_vars);


$subject="From ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {

$message.="<strong>".$mess[1]."</strong>&nbsp;&nbsp;&nbsp;".$mess[0]."<br>";
}
next($post_vars);
}

mail($_REQUEST['jon101@optonline.net'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");

?>
<script>
resizeTo(300, 300);
</script>


For one reason or another im not getting the emails.... my emails i jon101...

did i plug it in the wrong spot?


Thanks!

thetestingsite
11-05-2007, 02:04 AM
This part makes no sense to me:



mail($_REQUEST['jon101@optonline.net'], $subject, ...


Do you have a form field named jon101... or is it the email address. If the latter, take off the $_REQUEST[''] portion of it and it should work.

Hope this helps.

Jon101
11-05-2007, 02:06 AM
thanks, ill give it a shot.

Jon101
11-05-2007, 02:09 AM
so should it look like this:

mail('jon101@optonline.net', $subject, "

?

thanks!

thetestingsite
11-05-2007, 02:10 AM
yes, where jon101... is the email address that the mail will be sent to

Jon101
11-05-2007, 02:13 AM
Thanks so much... greatly appreciated.