Hey folks! I have this: session_start(); var_dump($_SESSION); Code (markup): The result is: array(2) { ["myusername"]=> NULL ["mypassword"]=> NULL } Code (markup): On my other hosting it was working just fine. I moved to godaddy and it is not working here... Is there anything I can do to fix this? I have php5.
Can you show where you do $_SESSION['myusername'] = .. ; ? I suspect your script probably used register globals which is not enabled by default any more in recent PHP versions (for security reasons)
It's wise to see if other scripts work too. Do a simple test like session_start(); if (!isset($_SESSION['test'])) { $_SESSION['test'] = "If this appears it's success!"; echo('Session set, refresh the page.'); } else { var_dump($_SESSION); } Code (markup): Will it work?
@TheOnly92: It is working if I am doing it your way. Right now I have a login form with POST.. The strange thing is that $_SESSION['myusername'] = $_POST['myusername']; Code (markup): also does not work...
I guess maybe there's something wrong with your form? Check your name and etc, and try to add premiumscripts's line in.