PDA

View Full Version : Email Form help????


vikcil
01-19-2007, 09:24 AM
Hi... some problem here...

I had change the email@yourserver.com to my email, but this i still can't sent out the form to my mail.... help help!!

Thanks!!!

<?php

/* ---------------------------
php and flash contact form.
by www.MacromediaHelp.com
---------------------------
Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server,
so make sure your email (on last line of this file) is one hosted on same server.
--------------------------- */


// read the variables form the string, (this is not needed with some servers).
$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$sender = $_REQUEST["sender"];


// include sender IP in the message.
$full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
$message= $full_message;

// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message);
$subject = stripslashes($subject);
$sender = stripslashes($sender);

// add a prefix in the subject line so that you know the email was sent by online form
$subject = "Contact form ". $subject;

// send the email, make sure you replace email@yourserver.com with your email address
if(isset($message) and isset($subject) and isset($sender)){
mail("email@yourserver.com", $subject, $message, "From: $sender");
}
?>

Paul Ferrie
01-22-2007, 10:09 AM
Try changing the $_request to either $_post or $_get