Jeff
-
Posts
3 -
Joined
-
Last visited
Posts posted by Jeff
-
-
Thanks guys I think in the exercise we create the mysqli_connect.php and test it in the htdocs folder to make sure it works then we put it in the preceding folder for use in the next script. I moved on to the next script (script 8.3 register.php where I do see the include ('../mysqli_connect.php') so I think I am ok there. In working with register.php when I fill out the form correctly and try to submit I get a bunch of errors like:
Notice: Constant DB_USER already defined in C:\xampp\mysqli_connect.php on line 7
Notice: Constant DB_PASSWORD already defined in C:\xampp\mysqli_connect.php on line 8
Notice: Constant DB_HOST already defined in C:\xampp\mysqli_connect.php on line 9
Notice: Constant DB_NAME already defined in C:\xampp\mysqli_connect.php on line 10
These errors repeat over and over a ton of times before the final error is posted:
Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\mysqli_connect.php on line 7
The errors don't lie as in the previous exercise we did define the db user,password, host, and name. I thought we needed that to access the db. Any ideas.
-
Hi everyone,
I am set up with xampp on my home pc, while I am going through the book and everything has worked great up to this point. In chapter 8 Larry talks about connecting to the db. First he has us put a temporary copy of mysqli_connect.php in the htdocs folder and look for a blank page when you run it in your browser. When I do that it works fine, then he says to delete that copy and just keep the mysqli_connect.php outside the htdocs folder for more security. In this case I saved it in the xampp directly that is just above the htdocs folder. When I do that I cannot connect any longer. Is this normal, or am I missing something?
Chapter 8 Mysqli_Conect.Php
in PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
Posted
Forget it, I still had the (include('../mysqli_connect.php'); in the mysqli_connect.php and that is why I was getting those errors. I took it out and it worked fine. Thanks again for the help. I am in the service business and in that business we call this take a call, make a call. lol