Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hello Mr. Ullman,

I am a big fan of your work.  I have owned your book PHP and MySQL for Dynamic Web Sites, 5th Ed. for a while now, but I've never actually posted a question on this website before.  It's great to finally make your acquaintance!

My question is sort of an unusual one.  I attempted to get the web application/ website from Chapter 18 of PHP and MySQL for Dynamic Websites, 5th Ed. up and running on a remote web host (I use ChemiCloud as my host, which is a company like Bluehost).  It was almost totally successful.  All the sophisticated PHP functionality works - the user registration, the user activation, the user login, etc.  The only thing is ... you'll never believe it ... the CSS doesn't work for me.  

It's this simple, foundational kind of issue.  I'm sure it's not something wrong with your code.  It must be something wrong on my end.  I don't get any error messages.  It's just that the website does not look right.  It must be the CSS, because when I look at any of the pages of the website, it looks like bare HTML without CSS, and all the navigation bar links (from footer.html) are not on the right of the screen as it shows on page 588 of your book.  Instead the navigation bar links are on the bottom of the screen.  If you want me to post or send a screenshot, just tell me.   

I got the code files from GitHub.  I set up the code files on my web host exactly the way you have them organized on GitHub.  Most of the files I put in my public_html folder, except for the 4 files that I put in an includes folder within my public_html folder.  Those 4 files are: config.inc.php, footer.html, header.html, and layout.css.  The only way that I departed from your organization of the code files is that I put the mysqli_connect.php file in the includes folder, and not in the folder that is above the public_html folder.  (The reason is that ChemiCloud told me that on their system I am not able to put anything in any folder higher than the public_html folder.)  Then I went into all of the files that reference the mysqli_connect.php file, and edited the references so that it would refer to includes/mysqli_connect.php.

There might be something I'm overlooking, but I really did try to solve this problem on my own before I posted.  I searched on this forum for any posts on CSS, and could not find any.  I looked at the layout.css file, and everything looks okay.  I looked at the header.html file (Script 18.1, on page 588), which contains the code:

<head>
    <meta charset="utf-8">
    <title><?php echo $page_title; ?></title>
    <link rel="includes/layout.css">
</head>

and everything looks okay.

My web host runs PHP version 7.0.33.  But based on what you say on page xii of your book, that's probably not what's causing my problem.  On page 4 of your book, you say that the HTML version is HTML5.  I don't think you say it in your book, but I assume that the version of CSS is CSS3 or CSS4.  I use a Lenovo laptop for my web development, running Windows 7, 64-bit.  If you want more info about my remote web host, tell me.   

Thank you for your time and help.

Best Regards,
John Iatropoulos

Share this post


Link to post
Share on other sites

Probably your code is not finding the CSS files but I don't have time to look into it for you. Find out where the files are and where your code is looking for them.

Share this post


Link to post
Share on other sites

Hi Mr. Ullman and Abigail,

I solved the problem.

Actually it was an error in the original code after all.  So I've found something that should go in the Errata of the book.  Specifically, on the GitHub page for the book, it is in: the ch18 code --> the html folder --> the includes folder --> the header.html file.  It's line 20.  That line says: 

<link rel="includes/layout.css">

 

Instead it should be:

<link rel="stylesheet" href="includes/layout.css">

 

The error is found in the book itself in Chapter 18, on page 588, in Script 18.1, in the  <head></head>  section.

Best Regards,

John Iatropoulos

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...