bharat 0 Posted January 12, 2013 Report 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 Quote Link to post Share on other sites
margaux 171 Posted January 12, 2013 Report 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 Quote Link to post Share on other sites
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.
Note: Your post will require moderator approval before it will be visible.