Page 1 of 1

undefined variable

Posted: Sun Oct 20, 2002 8:30 am
by tennis_blues
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!

Posted: Sun Oct 20, 2002 8:44 am
by tennis_blues
never mind.....

thanks anyway....

i think i found what i was looking for in:
viewtopic.php?t=511

Posted: Sun Oct 20, 2002 11:29 am
by Heavy
Have you read this:

Code: Select all

&lt;?php
if ($HTTP_COOKIE_VARS&#1111;'username'] &amp;&amp;
    !$HTTP_POST_VARS&#1111;'username'] &amp;&amp;
    !$HTTP_GET_VARS&#1111;'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&#1111;'REMOTE_ADDR']);
   echo "Security violation, admin has been alerted.";
   exit;
}
?&gt;
http://www.php.net/manual/en/security.r ... lobals.php