Not sure if the problem of the 'dbc' variable not being declared has been resolved yet, but I was experiencing the same issue. I finally got to a point where I saw that the index.php file had the line 'require(MYSQL)' AFTER the 'if($_SERVER['REQUEST_METHOD']=='POST'){ include('includes/login.inc.php');}'. This gave the dbc not defined error in the login.inc.php script.
Adding 'require(MYSQL)' to the login.inc.php script caused the error that one can't redeclare a function.
I believe I solved this by moving the 'require(MYSQL)' above the 'if($_SERVER['REQUEST_METHOD']=='POST'){ include('includes/login.inc.php');}' line in the index.php file.
Fatal Error: When Attempting To Log In
in Effortless E-Commerce with PHP and MySQL
Posted
Hi Everyone,
Not sure if the problem of the 'dbc' variable not being declared has been resolved yet, but I was experiencing the same issue. I finally got to a point where I saw that the index.php file had the line 'require(MYSQL)' AFTER the 'if($_SERVER['REQUEST_METHOD']=='POST'){ include('includes/login.inc.php');}'. This gave the dbc not defined error in the login.inc.php script.
Adding 'require(MYSQL)' to the login.inc.php script caused the error that one can't redeclare a function.
I believe I solved this by moving the 'require(MYSQL)' above the 'if($_SERVER['REQUEST_METHOD']=='POST'){ include('includes/login.inc.php');}' line in the index.php file.
I hope that helps.