PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Oct 20, 2019 1:24 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Dec 23, 2009 1:01 am 
Offline
Forum Newbie

Joined: Wed Dec 23, 2009 12:16 am
Posts: 2
When i am using session variable for my application it is working fine for IE but when it comes to FireFox it is becoming empty..it is a critical issue..anyone can help me..plzzz..


Top
 Profile  
 
PostPosted: Wed Dec 23, 2009 1:54 am 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US
Are you doing a redirect on the page? If so you may need to call the session function to save the session data, because both pages are in a single request.

_________________
(#10850)


Top
 Profile  
 
PostPosted: Wed Dec 23, 2009 4:08 am 
Offline
Forum Newbie

Joined: Wed Dec 23, 2009 12:16 am
Posts: 2
No..not redirecting to the same page..i am just loading the image and adding the prefix to the image name by the session variable.. it is working fine in ie but not in FF..plz... suggest me the solution to this issue...


Top
 Profile  
 
PostPosted: Tue Mar 02, 2010 1:57 am 
Offline
Forum Newbie

Joined: Tue Dec 22, 2009 6:34 pm
Posts: 16
you might be using session_register().
i've noticed this is not compatible with FF.


Top
 Profile  
 
PostPosted: Fri Apr 23, 2010 5:59 am 
Offline
Forum Commoner

Joined: Tue Sep 09, 2008 6:12 am
Posts: 25
Hi,

session_start(); function should be called at the beginning of the php file, before retrieve or save session data.

session_write.php
<?php
session_start();
$_SESSION['user_name'] = 'Admin';
?>

session_read.php
<?php
session_start();
echo 'Current User: ' . $_SESSION['user_name'];
?>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group