Jump to content
Larry Ullman's Book Forums

Ch. 17 Language Dropdown Not Working In Message Board


Recommended Posts

Hello,

 

I am on Chapter 17 Example Message Board.

 

I went through this chapter and I am confuse and feel that I am missing something because from the screenshots in the book I do not have the following after I completed the chapter. The Language does not change when I try to switch languages from the drop down menu.

The main question is what do I need to do to see that like in the book?

 

Please note I am not receiving any error messages and I can post to a thread or create a new one.

 

Please see the link to forum I created with the book files.

 

http://www.trueacewebdesign.com/larry-php/daforum/index.php

 

I also have zipped up the files and folders if you want to check the code.

 

http://www.trueacewebdesign.com/daforum.zip

 

 

I really appreciate the help.

 

JP

Link to comment
Share on other sites

I took your header.html page and place it on my system ..changed the database connection to connect to my test database, commented out the session_save_path line ... and I had to move the closing php tag ( ?> )  up .. and it worked fine for me ...

 

I would try placing the closing php tag up after line 132 in your header.html file right after your closing </form></p> html tags.

 

I tested this on a Windows / IIS system .. so this change may or may not work for you if you at it appears you are on a linux system ?

 

Also I would also .. (if you haven't already).. check to make sure of your database/tables character sets are correct so that the foreign characters will be dispalyed correctly.  I set all of mine to be UTF-8.  I also had to make sure my database connection was using UTF-8 when importing foreign characters into the tables in the database.

 

-Randy

  • Upvote 1
Link to comment
Share on other sites

Other than those adjustments I mentioned earlier ..I DID NOT have to make any other adjustements to your header.html file on the linux box and once again it ran fine ..

 

For further testing just make sure the mysql data and tables were setup correctly  .. In the header.html file I changed the default  $_SESSION['lid'] from 1 to 9 .. so that when the index page is first loaded the japanese characters would first be used   and then tested going to english via the drop down and everything worked ok using your header.html file on my hosted linux system ...

Here is a link to this project on linux hosting currently using your header.html file:

http://www.netlusive.com/demo/messageboard/index.php

 

-Randy

Link to comment
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...
 Share

×
×
  • Create New...