I've tried to see where I add my e-mail address in the send.php form and just cant figure this out so I can send the form. Please advise.
Thanks!
Jesse James
I've tried to see where I add my e-mail address in the send.php form and just cant figure this out so I can send the form. Please advise.
Thanks!
Jesse James
Hi Jesse James,
In your WordPress Dashboard go to Display Options > Contact Options and type your email address in the space provided.
Regards,
Mya
I just have HTML & PHP files it's not a Wordpress site. Thanks for responding Mya.
This is the code in my send.php file.
<?php
if(isset($_POST['Send'])){
$error = false;
$the_name = $_POST['yourname'];
$the_email = $_POST['email'];
$the_website = $_POST['website'];
$the_message = $_POST['message'];
if(!checkmymail($the_email))
{
$error = true;
$the_emailclass = "error";
}else{
$the_emailclass = "valid";
}
if($the_name == "")
{
$error = true;
$the_nameclass = "error";
}else{
$the_nameclass = "valid";
}
if($the_message == "")
{
$error = true;
$the_messageclass = "error";
}else{
$the_messageclass = "valid";
}
if($error == false)
{
$to = $_POST['myemail'];
$subject = "New Message from " . $_POST['myblogname'];
$header = 'MIME-Version: 1.0' . "\r\n";
$header .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$header .= 'From:'. $_POST['email'] . " \r\n";
$the_message = nl2br($the_message);
$message = "New message from $the_name
Mail: $the_email
Website: $the_website
Message: $the_message
";
mail($to,
$subject,
$message,
$header);
if(isset($_POST['ajax'])){
echo"<h3>Your message has been sent!</h3><p> Thank you!</p>";
}
}
}
function checkmymail($mailadresse){
$email_flag=preg_match("!^\w[\w|\.|\-]+@\w[\w|\.|\-]+\.[a-zA-Z]{2,4}$!",$mailadresse);
return $email_flag;
}
?>
This topic has been closed to new replies.