PHP – SESSIONS - UTF-8
I have developed a series of PHP pages that write data from the end user to the database in an orderly way, step by step. To achieve this functionality I pass the unique that joins all the tables in the database from one PHP page to the next via $_SESSION. To insure against the deeded “session_start(): Cannot send session cache limiter - headers already sent” I start all pages like this:
<?php # - header.html.
All of this worked fine. But now I am translating the information on the forms where the users are populating to Arabic. When I modify the page properties in dreamweaver and set the document encoding to UTF8 it adds (ff ee) to the beginning of the document which causes header to be sent prior to session_start() __ I learned all of this here!__
I also learned that MAC users an save a document with UTF8-NO BOM encoding which fixes this problem. So I see myself left with the following two solutions none of which makes me happy so I thought that I seek your advice:
A- I could stop using $_SESSION and pass the value which is simply an e-mail address (not a big problem if somebody did View Source) as a hidden form. The problem with this solution is that I don’t know how to distinguish between the two forms. I am thinking that the field will be relevant to the form that contains it, so I don’t know how I would call this hidden form field to act as my qualifier for my UPDATE, or INSET commands.
B- I could continue with $_SESSION and change the encoding of the document back to ANCI. Write the description for each form field with photoshop text and save it as a image and insert them in the forms. This sounds almost stupid!
This is my first experience with any language other then English. But I am sure that there are gurus that have crosses this bridge.