bharat Posted January 12, 2013 Share Posted January 12, 2013 Dear Sir/Mam, I am learning PHP 6 and MySQL 5 for Dynamic Web Sites in chapter 16 User Registration at register.php page, I found require_once (MYSQL); in line 10. But within ch16 folder there are no MySQL , and there is no extension like .php or .html. So I was thinking it is wrong or may be require_once (mysqli_connect);instead require_once (MYSQL); . Plz conform me.Regards, Bharat Link to comment Share on other sites More sharing options...
margaux Posted January 12, 2013 Share Posted January 12, 2013 Larry uses a constant to facilitate connecting to the database. In the config file you need to define the constant MYSQL e.g. define ('MYSQL', '../mysqli_connect.php'); The second parameter is the absolute path to your connection script. Then any file that needs to connect to the database simply calls the MYSQL constant require_once(MYSQL); 1 Link to comment Share on other sites More sharing options...
Recommended Posts