Re: include nubie question - need help

From: Date: Wed, 11 Jul 2001 14:19:19 +0000
Subject: Re: include nubie question - need help
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-57369@lists.php.net to get a copy of this message
Thanks Rehuel: Yes I guess that is the name has not been typed the $user_name will be empty and the line is if($HTTP_POST_VARS["user_name"]) { do something... } but I received this error Warning: Undefined index: user_name in H:\tenjo\public_html\sales\login.php on line 98 for the if line! i.e. if($HTTP_POST_VARS["user_name"]) This is what is strange and I cannot undertand... Ivo "Rehuel Lobato De Mesquita" <rehuel@cq-link.sr> wrote in message news:20010710193437.76142.qmail@pb1.pair.com... > Hey Ivo > > When PHP find an empty string, it returns this message > > In this case no one has logged in, so, it doesnot find "user_name" > > Include: Make sure the path of the file within the () is correct. So if the > file is in the same directory, this might be good, but if it's in a > different folder, you would need to specify that! Say it would be in /users, > then It would be > > include("/users/login.htm"); > > Try that, might work > > Rehuel > > "Ivo Stoykov" <ivostoykov@hotmail.com> wrote in message > news:20010710165811.26256.qmail@pb1.pair.com... > Hello > > I migrated to php 4.0.5 under windows IIS 5/win2000 AS > > The following line - if($HTTP_POST_VARS['user_name']) { ... WHATEVER ..} - > returns me following error > with and without global $HTTP_POST_VARS > Warning: Undefined index: user_name in E:\10ioWebSite\sales\login.php on > line 99 > > and the line - include ("login.htm"); returns following: > Warning: Failed opening 'login.htm' for inclusion (include_path='.') in > E:\10ioWebSite\sales\login.php on line 131 > > the php.ini sais: include_path = "." > > both files are in the same dir. > > Any ideas? thank you > > >

« previous php.general (#57369) next »