SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Nothing after <body>
-
Mar 15, 2007, 11:39 #1
- Join Date
- Mar 2007
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Nothing after <body>
Hello! I got the book "Build your own database driven website using php & mysql 3rd edition". In the end of Chapter 4 it tells you how to connect (and add) to a mysql database. I wrote down exactly that code in the book, but all I get is a white page, and when i look at scourcecode it's correct to <body>, but there's nothing after it! Anyone who read the book know what's wrong? Thank you.
-
Mar 15, 2007, 11:56 #2
Hiya, welcome to the forums
Can you post your full code for the page?
-
Mar 15, 2007, 12:01 #3
Syntax error and error reporting and/or error display off. Turn them on in your php.ini
Saul
-
Mar 15, 2007, 14:20 #4
- Join Date
- Jan 2007
- Location
- Orlando, FL
- Posts
- 417
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I have no idea what is in chapter 4 of that book, but connecting and adding data to a database would not display anything to the webbrowser unless there was an echo or a print or something in there to display a success or failure message.
As has been said earlier, please post the code you are having trouble with.
You might want to check mysql if you know how and verify that the commands are not working perfectly well but just not displaying any messages.
-
Mar 15, 2007, 16:21 #5
- Join Date
- Jan 2007
- Posts
- 191
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
php_daemon knows best: Just make sure
error_reporting = E_ALL
is in your php.ini
Don't forget to restart Apache/IIS
-
Mar 15, 2007, 18:59 #6
- Join Date
- Feb 2007
- Location
- England, High Wycombe Bucks
- Posts
- 76
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hiya Mate!
I may be wrong, but I get the feeling I'm right. I copied the code exactly as it was displayed in this book. However, the book mentions that you should install to C:\php. If this is the case, and you have followed this instruction, (and you have recently installed say PHP 5.2) then your problem is not a syntax error. Instead it's a configuration setting in your php.ini file. You'll find that php may have actually installed to something like C:\php\php12345. Again, I could be wrong, but this is the problem I had, I changed it, and all my scripts (requiring connection to a database) came to life. Your problem is that you aren't connecting to your database, thats why you got to chapter 4 of the book, all of the code snipets up to this point, haven't required you to connect to a database.
Read my post at the bottom of this link:
http://www.sitepoint.com/forums/show...ight=jokes.php
I hope this helps you buddy.Wyte R@ven - Creator of the Rift
Bookmarks