Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.