Page 1 of 1

Login Problems!

Posted: Tue Jun 11, 2002 5:00 am
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]

Posted: Tue Jun 11, 2002 5:02 am
by volka
try
print_r($HTTP_POST_VARS);

Posted: Tue Jun 11, 2002 5:43 am
by Henke
Thanx for that Volka!
I´m probably stupid, but where shall i put it?
/henke

Posted: Tue Jun 11, 2002 5:50 am
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

Posted: Tue Jun 11, 2002 8:34 am
by Henke
thx mac but this did´t work. :(

Posted: Tue Jun 11, 2002 8:36 am
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