PHP Newsletter

Join now and receive weekly updates pertianing to the world of PHP.

Polls

What do you think about the new PHPMine Design?
Awesome
Not Bad
Sucks

PHP Gigs By City

PHP Jobs By Topic

Advertisements

PHP mail form help..................?

Asked 2010-03-04 03:42:06 by Twist

when the submit button is hit it returns an error 405 (access to page is not allowed)
can anyone suggest what is wrong with it please?

this is the script

<?php

$emailSubject = 'contact.htm';
$webMaster = ``;

$email = $_POST['email'];
$name = $_POST['name'];
$comments = $_POST['comments'];

$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>

Comments: $comments <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);

$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="4;URL=http:///contact.html">
<style type="text/css">
<!--
body {
background-color: ="lightblue";
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 25px;
font-style: italic;

Anwered 2010-03-04 03:44:49 by Towelie

Have you installed Apache ?

Anwered 2010-03-04 04:35:26 by marvin

ummm.. URL=http:///contact.html... i think its the problem.. you have three slashes..
i'm not sure..

Questions and answers provided by the Yahoo Answers Community.