XAMPP Undefined Index - $_SESSION, $_POST, $_GET, $_REQUEST
Posted: 29. January 2012 01:36
Hello all, this is my second time installing XAMPP onto my Windows XP OS, and I didn't have this problem before.
I'm trying to make a Google Chrome tab to make users' experiences with Chrome more personalized.
I just started it, and so I decided to start functions.php:
Here is the error that I am getting:
Notice: Use of undefined constant username - assumed 'username' in C:\xampp\htdocs\chrome\functions.php on line 2
I've searched around, and have found no answers. Again, I did not have this problem with XAMPP before, at least, I don't think I did.
I tried configuring php.ini and set error reporting to just E_ALL just to see if PHP would "shut up". No luck.
Could you please help me understand why things such as $_SESSION, $_COOKIE, $_GET, $_POST, $_SERVER, and $_REQUEST are not working and why they are thought to be undefined indexes?
Thank you. Your answers are appreciated.
-Ricky
I'm trying to make a Google Chrome tab to make users' experiences with Chrome more personalized.
I just started it, and so I decided to start functions.php:
- Code: Select all
<?php
if(isset($_SESSION["username"])){
$user=$_SESSION["username"];
}
else{
$user="";
}
?>
Here is the error that I am getting:
Notice: Use of undefined constant username - assumed 'username' in C:\xampp\htdocs\chrome\functions.php on line 2
I've searched around, and have found no answers. Again, I did not have this problem with XAMPP before, at least, I don't think I did.
I tried configuring php.ini and set error reporting to just E_ALL just to see if PHP would "shut up". No luck.
Could you please help me understand why things such as $_SESSION, $_COOKIE, $_GET, $_POST, $_SERVER, and $_REQUEST are not working and why they are thought to be undefined indexes?
Thank you. Your answers are appreciated.
-Ricky