0

I just re-installed XAMPP and I'm getting an error that I've never gotten before.

Notice: Undefined index: username in C:\xampp\htdocs\acc_terminator\unicode.php on line 3

Notice: Undefined index: password in C:\xampp\htdocs\acc_terminator\unicode.php on line 4

Notice: Undefined index: account_level in C:\xampp\htdocs\acc_terminator\unicode.php on line 5

Those lines are:
$xusername = $_SESSION;
$xpassword = $_SESSION;
$xaccount_level = $_SESSION;

3
Contributors
3
Replies
6
Views
6 Years
Discussion Span
Last Post by diafol
0

When you did

session_start();
/*did you set the variables "
$_SESSION['username'], $_SESSION['password'] and $_SESSION['account_level']*/

???

That's the error you're getting. those variables inside the $_SESSION array haven't been initialized.

Regards.

edit: I'm not sure but, shouldn't it be:
$_SESSION = $xusername;
$_SESSION = $xpassword;
$_SESSION = $xaccount_level;
?

Edited by charlybones: n/a

0

When you did

session_start();
/*did you set the variables "
$_SESSION['username'], $_SESSION['password'] and $_SESSION['account_level']*/

???

That's the error you're getting. those variables inside the $_SESSION array haven't been initialized.

Regards.

edit: I'm not sure but, shouldn't it be:
$_SESSION = $xusername;
$_SESSION = $xpassword;
$_SESSION = $xaccount_level;
?

In my other php files i will use $xusername instead of $_SESSION.
The code looked like this before, no problems..

0

Perhaps it would help if you posted your code. The whole page if possible.

Edited by diafol: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.