Login Problems!

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
Henke
Forum Newbie
Posts: 3
Joined: Tue Jun 11, 2002 5:00 am

Login Problems!

Post by Henke »

Hello!!
Having a little problem with my login.

Notice: Undefined index: phpUserLogin_user_name in D:\webb\crookz\news\admin\phpUserLogin_main.php on line 15

Notice: Undefined index: phpUserLogin_pw in D:\webb\crookz\news\admin\phpUserLogin_main.php on line 17

Here´s the code:

$phpUserLogin_user_name = $HTTP_POST_VARS["phpUserLogin_user_name"];

$phpUserLogin_pw = $HTTP_POST_VARS["phpUserLogin_pw"];

Any help would be great!!
[/b]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

try
print_r($HTTP_POST_VARS);
Henke
Forum Newbie
Posts: 3
Joined: Tue Jun 11, 2002 5:00 am

Post by Henke »

Thanx for that Volka!
I´m probably stupid, but where shall i put it?
/henke
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Try,

Code: Select all

// some code
echo '<pre>';
print_r($HTTP_POST_VARS);
echo '</pre>';

$phpUserLogin_user_name = $HTTP_POST_VARS&#1111;"phpUserLogin_user_name"];
// rest of code
Mac
Henke
Forum Newbie
Posts: 3
Joined: Tue Jun 11, 2002 5:00 am

Post by Henke »

thx mac but this did´t work. :(
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

If nothing printed then the form probably hasn't been submitted yet. Is this code on the same page as the HTML for the form?

BTW, print_r() is used to check the contents of an variable. In this case to see if there was anything in the $HTTP_POST_VARS array. It's just a debugging tool and so wouldn't have stopped the errors even if there was anything in $HTTP_POST_VARS.

Mac
Post Reply