I have a contact form that uses mootools to generate an inline message.
When I set the contact form up on its own, it works great… but when I drop it into the page (same exact paths) it [B]a)[B]b)
[B]
For example:
[I]
This one works:
[url]http://www.jxmckenzie.com/grandmothersHTML2/smallForm.php
[I]This one doesn’t work(in the header):
[url]http://jxmckenzie.com/grandmothersHTML2/about.php
[B]This is the PHP:
[code=php]<?php
error_reporting(E_NOTICE);
function valid_email($str)
{
return ( ! preg_match(“/^([a-z0-9+_-]+)(.[a-z0-9+_-]+)*@([a-z0-9-]+.)+[a-z]{2,6}$/ix”, $str)) ? FALSE : TRUE;
}
if($_POST[‘e_mail’]!=” && valid_email($_POST[‘e_mail’])==TRUE)
{
$to = ‘[email protected]’;
$headers = ‘From: ‘.$_POST[‘e_mail’].”. “rn” .
‘Reply-To: ‘.$_POST[‘e_mail’].” . “rn” .
‘X-Mailer: PHP/’ . phpversion();
$subject = “Hello! Somebody has signed up for your Mailing List”;
$message = ‘The following email address should be added to your mailing list’.’ ‘.$_POST[‘e_mail’];
if(mail($to, $subject, $message, $headers))
{
echo ‘Thanks, you have been added to the mailing list’;
}
else {
echo “Error. Message not sent.”;
}
}
else {
echo ‘Please make sure that you entered a valid email.’;
}
?>
Any ideas? Thanks!