note 60474 added to ref.mail
| From: | Alexeymail at real dot ua | Date: | Sun, 08 Jan 2006 08:34:02 +0000 |
| Subject: | note 60474 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-101386@lists.php.net to get a copy of this message | ||
In Tim's excellent code on this page there is one thing, which did not work for me:
// Make sure the form was indeed POST'ed:
// (requires your html form to use: action="post")
if(!$_SERVER['REQUEST_METHOD'] == "POST"){
die("Forbidden - You are not authorized to view this page");
exit;
}
I changed it like this:
if(!($_SERVER['REQUEST_METHOD'] == "POST")){
die("Forbidden - You are not authorized to view this page");
exit;
}
and it started to catch what it was intended to catch. I added one pair of brackets.
----
Manual Page -- http://www.php.net/manual/en/ref.mail.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60474
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60474&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60474&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60474&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60474&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60474&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60474&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60474&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60474&report=yes
Search -- http://master.php.net/manage/user-notes.php