Hello World;
Today I think I’ve experienced the weirdest PHP issue in history, concerning a PHP session.
I have two pages (So far ). Index.php and Contact.php
Ive made an SQL database, which allows the translation of different texts, into different languages. On index.php, the user may chose a language, or use the default, English. (On the very top of the page, I do the
start_session();
). Everything works fine. The language setting is store in
$_SESSION['Lang']
, and I can toggle between different languages I’ve made. The problem arise as soon as I try to call the
$_SESSION['Lang']
on Contact.php. (I have already written the
start_session();
on the top). However, there is still no language selected from the database. I thought that was weird, as I could not find any mistakes in the coding. Then I tried doing a
echo $_SESSION['Lang']
, but the language still doesnt show up. Basically, the Session variable is gone. Vanished into thin air.
I Have used sessions before, and there everything works fine. At this moment the page is only localhost (XAMPP).
What am I doing wrong? :s Have I found the Post-Millennium bug in PHP?
Best Regards
NathanZachary
p.s. If theres a lack of information, I can try and fetch some more, on request.