Hey guys.
Im a noob here, and also beginner on PHP (so dont understand anything)
anyways my problem is im trying to enter the captcha value wrong so i can see what message i get (and also to see if everything works).
i got the codes from this site and i havent change any coding only the email.
This is the error msg im getting
"Warning: Header may not contain more than a single header, new line detected. in /home/egyptian/public_html/mailer.php on line 24" i have wrote in the code where line 24 is. using. before the doctype.
The code im using is :
<?php
// load the variables form address bar
$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$from = $_REQUEST["from"];
$verif_box = $_REQUEST["verif_box"];
// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message);
$subject = stripslashes($subject);
$from = stripslashes($from);
// check to see if verificaton code was correct
if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){
// if verification code was correct send the message and show this page
mail("support@mymail.co.uk", 'Online Form: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from");
// delete the cookie so it cannot sent again by refreshing this page
setcookie('tntcon','');
} else {
// if verification code was incorrect then return to contact page and show error
<This is line 24> header("Location:".$_SERVER['HTTP_REFERER']."?subject=$subject&from=$from&message=$message&wrong_code=true");
exit;
}
?>
<!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>E-Mail Sent</title>
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style></head>
<body>l
Email sent. Thank you.<br />
<br />
Return to <a href="/">home page</a> ?
</body>
</html>
Im sorry i dont know how to paste code with line number.. I hope someone can help me with this error and also enlighten me how to copy with line numbers. haha
Thanks in advance guys & girls
p.s- someone mentioned using urlencode & urldecode. but i dont know anything bout php..so im lost ..