Quote:
Originally Posted by Redcore
How about I just reformat sendmail.php to make it easier for you to edit...
sendmail.php (version 2)
PHP Code:
<?php
// THESE ARE THE VARIABLES THAT YOU NEED TO EDIT!
$sendto = "ENTER-YOUR-EMAIL-HERE" // for example: username@usershost.com
$gotopage = "ENTER-YOUR-PAGE-HERE" // for example: http://www.yoursite.com/thankyou.html
// end editable variables
include "function_checkEmail.php";
$_POST = array_map('strip_tags', $_POST);
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
// let's format them
$message = "Inquiry:" . "\n\n" . $message;
$subject = "Email From Website - " . $name;
// this will show you who it's from AND will blind carbon-copy the message to them
$headers .= 'From: ' . $name . '<' . $email . '>' . "\r\n";
$headers .= 'Bcc: ' . $name . '<' . $email . '>' . "\r\n";
// let's check if that email is valid or not!
// if it's valid - send the email
if( checkEmail( $email ) ) {
mail($sendto, $subject, $message, $headers);
header("Location: $gotopage");
} else {
die("Email provided is not valid.");
}
?>
All you need to do is edit the variables at the top of the page with your information.
|
lol, sorry. I did say im not very wise with php
Its 1am here now, but tomorrow morning Im going to try this out and see how I get on with it.
I will keep you informed of my progress.
Thanks very much.