#Last update - I added a function that check if the email submitted is a valid one.
#This script has been developped by Francesco D'Alesio [francesco@piuchegratis.com]
#Here you are all the variables you need to change.
$sitename = "www.pcnavigator.nl"; #Please write in the name of your site
$admin = "informatie@pcnavigator.nl"; #Please write in your email address
$homepage = "http://www.pcnavigator.nl/kruimel"; #Please write in the url of your homepage
$type1 = "Ik heb hulp nodig bij het inloggen";
$type2 = "Ik ben mijn wachtwoord kwijt";
$reply = "yes"; #Do you want this script give an automatic reply to whom fill this form? Leave "yes" if you want it, write "no" if you don't.
$reply_sub = "Bedankt voor je reactie.
Wij nemen zo spoedig mogelijk contact met je op, voor je inloggegevens.
Groeten van PCN-Team";
#Do not change anything below this line!
if(!$action) {
echo "
$sitename - Hulp bij inloggen
";
exit;
}
if($action = "send"); {
if(!$fname) {
echo "Please type your first name in the first name field.";
exit;
}
if(!$lname) {
echo "Please type your last name in the last name field.";
exit;
}
if(!$email) {
echo "Please type your email address in the email address fiels.";
exit;
}
function EmailOK($email)
{
return( ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.
'@'.
'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.
'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',
$email) );
}
if(!EmailOK($email)) {
echo "The email you submitted is not valid. Please type in your real email address";
exit;
}
if(!$body) {
echo "Please type your message in the message field";
exit;
}
mail("$admin","Comments/Requests From $sitename","From: $fname $lname - $email \n$type \n\n$body ","From:$email");
if($reply = "yes") {
mail("$email","Automatisch antwoord van $sitename","$reply_sub","From:$admin");
}
?>
- Thank you
Dank je wel. Een automatisch bericht zodat je weet dat we je bericht ontvangen hebben, is zojuist naar je verstuurd. We nemen zo snel mogelijk contact met je op, voor je inloggegevens.