Msg#: 4497205 posted 6:21 am on Sep 19, 2012 (gmt 0)
Hi, I have just gotten back into PHP and I am having a simple error. The reason why I call it simple is because I have seen it answered on google already but they all use If statements to fix it. Heres the errors I get Notice: Undefined index: id in C:\xampp\htdocs\MemberSystem\config.php on line 7
Notice: Undefined index: password in C:\xampp\htdocs\MemberSystem\config.php on line 7
Now, in my config....
<?php @session_start(); //allows session
$conn = mysql_connect("localhost","haha",""); //not my actual connectionsl0l mysql_select_db("haha2") or die(mysql_error());
$logged = MYSQL_QUERY("SELECT * FROM `members` WHERE `id` = '$_SESSION[id]' AND `password` = '$_SESSION[password]'"); $logged = mysql_fetch_array($logged);
As you can see on line 7 is where all the problems happen, I fixed the last error by just adding a bracket on one of them and it removed an undefined index error, but I can't seem to fix this one... Please help.