In a game that I run, after you log in, it keeps saying You have left fields blank please relogin on any link within the game that you click. I checked my error logs, and am getting this message: [client 142.68.44.81] PHP Notice: Undefined index: email in /var/www/vhosts/www.dungeonofchaos.com/httpdocs/gameconfig.php on line 3, referer: http://www.dungeonofchaos.com/check.php [client 142.68.44.81] PHP Notice: Undefined index: password in /var/www/vhosts/www.dungeonofchaos.com/httpdocs/gameconfig.php on line 4, referer: http://www.dungeonofchaos.com/check.php The first 5 lines of code are: <?php session_start(); $email = $_REQUEST['email']; $password = $_REQUEST['password']; $dbh=mysql_connect ("localhost", "dungeono_DoC", "stone") or die ('I cannot connect to the database because: ' . mysql_error()); Can anyone help? If I take out lines 3 and 4 completely, you can't even log in, but after you log in, and the check.php file tries to load another link, it gives the relogin message.
Hi, try this: Code: <?php session_start(); if( isset($_REQUEST['email']) && isset($_REQUEST['password']) ){ $email = $_REQUEST['email']; $password = $_REQUEST['password']; } Btw: I hope you escape $email and $password before you use it in the sql-query. Best regards, Olli