Jump to content

can not read session ??


yusufhermanto

Recommended Posts

Hi, all  ;D

 

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.