session variable problem
Moderator: General Moderators
-
venkylingutla
- Forum Newbie
- Posts: 5
- Joined: Fri Jan 29, 2010 4:39 am
session variable problem
session variable is working fine in IE but it is not working in Fire fox and chrome browsers.i am getting null value in this browsers.please help me to resolve this prob.
-
kushaljutta
- Forum Commoner
- Posts: 50
- Joined: Fri Dec 26, 2008 11:05 am
Re: session variable problem
Can you send me your code, so I can try to resolve your problem,
use session_register('session name'); for registering the session variables
Kushal Jutta
use session_register('session name'); for registering the session variables
Kushal Jutta
-
venkylingutla
- Forum Newbie
- Posts: 5
- Joined: Fri Jan 29, 2010 4:39 am
Re: session variable problem
here is the code
require_once('./utils.php');
if(!isset($_SESSION['timestamp_logo_path']))
{
$_SESSION['timestamp_logo_path'] = BASENAME_TIME;
}
$tempFile = $_FILES['Filedata']['tmp_name'];
$fileName = $_FILES['Filedata']['name'];
$fileSize = $_FILES['Filedata']['size'];
$ext=substr($fileName, strrpos($fileName, '.') + 1);
if(($ext=='jpg')||($ext=='jpeg')||($ext=='png') )
{
$path="ProfileImages/";
$uploadfilePath=$path.$_SESSION['timestamp_logo_path']."_".$fileName;
}
else{
$path="Files/Artifact/";
$fileext="A_".$fileName;
$uploadfilePath=$path.$fileext;
$file_var.=$fileext."@";
}
move_uploaded_file($tempFile,$uploadfilePath);
//The session variable $_SESSION['timestamp_logo_path'] i am using in some other page.
it is working fine in IE but it is not working in Firefox browser.
require_once('./utils.php');
if(!isset($_SESSION['timestamp_logo_path']))
{
$_SESSION['timestamp_logo_path'] = BASENAME_TIME;
}
$tempFile = $_FILES['Filedata']['tmp_name'];
$fileName = $_FILES['Filedata']['name'];
$fileSize = $_FILES['Filedata']['size'];
$ext=substr($fileName, strrpos($fileName, '.') + 1);
if(($ext=='jpg')||($ext=='jpeg')||($ext=='png') )
{
$path="ProfileImages/";
$uploadfilePath=$path.$_SESSION['timestamp_logo_path']."_".$fileName;
}
else{
$path="Files/Artifact/";
$fileext="A_".$fileName;
$uploadfilePath=$path.$fileext;
$file_var.=$fileext."@";
}
move_uploaded_file($tempFile,$uploadfilePath);
//The session variable $_SESSION['timestamp_logo_path'] i am using in some other page.
it is working fine in IE but it is not working in Firefox browser.
Re: session variable problem
what kind of errors or warnings you get ? Or just gives undefined var error ?
-
venkylingutla
- Forum Newbie
- Posts: 5
- Joined: Fri Jan 29, 2010 4:39 am
Re: session variable problem
i am not getting errors .. i am not able to get the variable value.it is just giving me null value in firefox but it is giving me the value in IE