yusufhermanto Posted June 1, 2007 Share Posted June 1, 2007 Hi, all I there problem about session. for local computer i use php version 4.3.9. and for php hosting it use 5.1.6. but my session not run on the php hosting. my program can not read this code: session_start(); session_register('user_session'); session_register('rl_session'); $user_session = $row["user_name"]; $rl_session = $row["real_name"]; echo "Welcome".$row["user_name"]; echo "<br>Your login sucess!"; echo "<br><a href=index.php>Tampilkan Menu</a>"; header("location:index.php?exec=loginsukses.php"); exit; how to read session on php version 5 ? Quote Link to comment https://forums.phpfreaks.com/topic/53837-can-not-read-session/ Share on other sites More sharing options...
chigley Posted June 1, 2007 Share Posted June 1, 2007 session_register() is long deprecated for a start. But you're calling from the $row array, and not the $_SESSION array. Quote Link to comment https://forums.phpfreaks.com/topic/53837-can-not-read-session/#findComment-266151 Share on other sites More sharing options...
yusufhermanto Posted June 1, 2007 Author Share Posted June 1, 2007 session_register() is long deprecated for a start. But you're calling from the $row array, and not the $_SESSION array. what is wrong with my code ?? can you tell my how to write the right code for this problems ? on my local computer this script is not have problems. but when i run on php other version it have problems. please help me. Quote Link to comment https://forums.phpfreaks.com/topic/53837-can-not-read-session/#findComment-266156 Share on other sites More sharing options...
obsidian Posted June 1, 2007 Share Posted June 1, 2007 session_start(); $_SESSION['user_session'] = $row["user_name"]; $_SESSION['rl_session'] = $row["real_name"]; echo "Welcome, ".$row["user_name"]; echo "Your login sucess!"; echo "<a href=index.php>Tampilkan Menu[/url]"; header("location:index.php?exec=loginsukses.php"); exit; Quote Link to comment https://forums.phpfreaks.com/topic/53837-can-not-read-session/#findComment-266214 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.