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

Yes I am on a linux system as I am using Fatcow hosting. www.fatcow.com apache server.

 

I updated the header with your instuctions but it didnt work.

 

Randy

 

Can you email me a link to your version of it  live on your testing server.

 

I would love to see how the launaguge drop down working on your end.

 

Thank you

 

JP

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

 Share

×
×
  • Create New...