RicardoNET Posted April 8, 2006 Share Posted April 8, 2006 Hello everybody,its seems to be that one of my script files wont work like it should be anymore, Can somebody help me around with this error;[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Notice: Undefined index: username in C:\WebServer\htdocs\ricardox\user_check.php on line 10[/quote]The code is;[code]$user = $_COOKIE['username'];$sql = mysql_query("SELECT * FROM users WHERE username = '$user'"); // This is line 10$row = mysql_fetch_array($sql);$num = mysql_num_rows($sql);[/code]What is the problem right now on this code? Thanks for your solution if you have one! Quote Link to comment Share on other sites More sharing options...
khendar Posted April 8, 2006 Share Posted April 8, 2006 Undefined index means the the key/index of the array that you are trying to read is not set. $_COOKIE['username'] doesn't exist. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.