Hi
i m using php4 with iis5...and want to test my send mail
script but when i run script browsers shows a message..
HTTP 405 - Resource not allowed
i m using address in sendmail [email]me@localhost.com[/email]
code is....
<?php
// if submitted form process and send mail
if ($REQUEST_METHOD == "POST") {
// just to be on the safe side
// I'll strip out HTML tags
// (scripting code may mess with some email clients)
$realname = strip_tags($realname);
$email = strip_tags($email);
$feedback = strip_tags($feedback);
$sendto = "$email";
$subject = "Send Mail Feedback Using PHP";
$message = "$realname, $email\n\n$feedback";
mail($sendto, $subject, $message);
}
?>
<html>
<head>
<title>web.blazonry : PHP Mail Form</title>
<meta name="author" value="Marcus Kazmierczak">
<meta name="copyright" value="(c) 2000 Marcus Kazmierczak, marcus@mkaz.com">
</head>
<body bgcolor="#FFFFFF">
<h2>Send Mail using PHP </h2>
<p>An easy way to get feedback on a site is to have
it emailed to you. This script shows you how to create
a Feedback form with the response being emailed to you
using PHP.</p>
The first thing we need is our HTML form.
Keeping it simple I'll only ask for Name, Email
and their Feedback. Use your browser's view source
if you would like the HTML code.
<p><hr size=1 noshade></p>
<?php
// if submitted form display sent message
if ($REQUEST_METHOD=="POST") {
echo("<P><b>Message Sent</b></p>\n");
echo("<blockquote><pre>\n");
echo("$message");
echo("</pre></blockquote>");
}
// if not display form
else {
?>
<!-- START HTML FORM -->
<form action="<? echo("$script_name"); ?>" METHOD="POST">
<table cellpadding=4 cellspacing=0 border=0>
<tr><td><b>Name: </b></td><td><input type="text" name="realname" size=25></td></tr>
<tr><td><b>Email:</b></td><td><input type="text" name="email" size=25></td></tr>
<tr><td colspan=2><b>Feedback:</b><br>
<textarea name="feedback" rows=4 cols=40 wrap=physical></textarea>
</td></tr>
<tr><td colspan=2 align=right><input type="submit" value="Send Feedback"></td></tr>
</table>
</form>
<!-- END HTML FORM -->
<?php } ?>
<p><hr size=1 noshade></p>
</body>
</html>