I am a new php programmer......can someone please point me in the right direction....
I have a simple form starting with:
"<form method=POST action="login.php">
in login.php, I have:
if ($REQUEST_METHOD == "POST")
and when I try to run this, I get:
"Undefined variable: REQUEST_METHOD...."
.........next is a similar problem:
When I try to run the php file (the second example on the page) in:
http://hotwired.lycos.com/webmonkey/99/ ... rogramming
I get:
"Undefined variable: id "
Can someone please help me with this undefined variable problem, please?
Thanks so much in advance!
undefined variable
Moderator: General Moderators
-
tennis_blues
- Forum Newbie
- Posts: 21
- Joined: Sun Oct 20, 2002 8:30 am
- Heavy
- Forum Contributor
- Posts: 478
- Joined: Sun Sep 22, 2002 7:36 am
- Location: Viksjöfors, Hälsingland, Sweden
- Contact:
Have you read this:
http://www.php.net/manual/en/security.r ... lobals.php
Code: Select all
<?php
if ($HTTP_COOKIE_VARSї'username'] &&
!$HTTP_POST_VARSї'username'] &&
!$HTTP_GET_VARSї'username'] ) {
// Perform other checks to validate the user name...
$good_login = 1;
fpassthru ("/highly/sensitive/data/index.html");
} else {
mail("admin@example.com", "Possible breakin attempt", $HTTP_SERVER_VARSї'REMOTE_ADDR']);
echo "Security violation, admin has been alerted.";
exit;
}
?>