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 ? 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. 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. 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; Link to comment https://forums.phpfreaks.com/topic/53837-can-not-read-session/#findComment-266214 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.