undefined variable

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tennis_blues
Forum Newbie
Posts: 21
Joined: Sun Oct 20, 2002 8:30 am

undefined variable

Post 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!
tennis_blues
Forum Newbie
Posts: 21
Joined: Sun Oct 20, 2002 8:30 am

Post by tennis_blues »

never mind.....

thanks anyway....

i think i found what i was looking for in:
viewtopic.php?t=511
User avatar
Heavy
Forum Contributor
Posts: 478
Joined: Sun Sep 22, 2002 7:36 am
Location: Viksjöfors, Hälsingland, Sweden
Contact:

Post 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
Post Reply