logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Spry
Register FAQ Members List Search Today's Posts Mark Forums Read

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-09-2011, 05:26 PM   #1
currysteph
 
Join Date: Feb 2011
Posts: 7
Question Need help with Contact page (formmail.php)

Can someone tell me why this isnt working?

www.thecurrys.us
(click the red envelope icon)

2 things...

1. after info is entered it doesnt goto the thankyou.html page
2. the info is not sent to my email address.

Im sure the problem lies either within the formmail.php
or
I do not have the formmail.php in the right location...currently it is in the root folder of the website.

Here is the code within the formmail.php

--------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
<title>Email Form</title>
</head>

<body>
<?php
$name=addslashes($_POST['name']);
$email=addslashes($_POST['email']);
$comments=addslashes($_POST['message']);

// you can specify which email you want your contact form to be emailed to here

$toemail = "my_email_address@gmail.com";
$subject = "From: thecurrys.us Website";

$headers = "MIME-Version: 1.0\n"
."From: \"".$name."\" <".$email.">\n"
."Content-type: text/html; charset=iso-8859-1\n";

$body = "Name: ".$name."<br>\n"
."Email: ".$email."<br>\n"
."Comments:<br>\n"
.$comments;

if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
{
echo "That is not a valid email address. Please return to the"
." previous page and try again.";
exit;
}

mail($toemail, $subject, $body, $headers);
echo "Thanks for submitting your comments";
?>
</body>
</html>

-----------------------

thanks for any help
currysteph is offline   Reply With Quote
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com