Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Create and access session variables


senthilkumar

Recommended Posts

Posted

Hi Everybody,

 

I am using OScommerce as my back end. I use my own coding for front end.

 

I has created a session in back end as like "$_SESSION['idea']['pagefrom'] = 'Administrator';". i put this session in one of my backend page and i able to edit access in any of my back end.

 

But the same session,iam unable to access in my front end(please note that iam using my own coding for front end).

 

i.e "

<?php if($_SESSION['idea']['pagefrom'] == 'Administrator') {

header('Location:admin/categories.php');

exit;

} else {

header('Location:ck_shopping_bag.php');

exit;

} ?>"

here the session value is blank.( $_SESSION['idea']['pagefrom']='';)

 

How i create a new session in back end and i want to access that session in my front end.(please note that iam using my own coding for front end).

 

Please any one help me..

Senthil Kumar R

Posted
Hi Everybody,

 

I am using OScommerce as my back end. I use my own coding for front end.

 

I has created a session in back end as like "$_SESSION['idea']['pagefrom'] = 'Administrator';". i put this session in one of my backend page and i able to edit access in any of my back end.

 

But the same session,iam unable to access in my front end(please note that iam using my own coding for front end).

 

i.e "

<?php if($_SESSION['idea']['pagefrom'] == 'Administrator') {

header('Location:admin/categories.php');

exit;

} else {

header('Location:ck_shopping_bag.php');

exit;

} ?>"

here the session value is blank.( $_SESSION['idea']['pagefrom']='';)

 

How i create a new session in back end and i want to access that session in my front end.(please note that iam using my own coding for front end).

 

Please any one help me..

 

Hi,

Just desable the session in application_top.php and use your own session variable then it will works.

When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Posted
Hi,

Just desable the session in application_top.php and use your own session variable then it will works.

 

I dont know how to disable the session in application_top.php. Sorry. Please help me. Also, if i disable the session in application_top at back end means it will affect any other pages in backend?

 

I appreciate your fast response. thanks.

Senthil Kumar R

Posted
I dont know how to disable the session in application_top.php. Sorry. Please help me. Also, if i disable the session in application_top at back end means it will affect any other pages in backend?

 

I appreciate your fast response. thanks.

 

 

offcource it will affect you hole backend pages.

Then you will need to set your own session variable in every page.

 

you may set application_top.php

 

// check if sessions are supported, otherwise use the php3 compatible session class

if (!function_exists('session_start'))

{

define('PHP_SESSION_ID', 'sesskey');

define('PHP_SESSION_NAME', 'osCsid');

define('PHP_SESSION_PATH', $cookie_path);

define('PHP_SESSION_DOMAIN', $cookie_domain);

define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);

 

include(DIR_WS_CLASSES . 'sessions.php');

}

 

// define how the session functions will be used

require(DIR_WS_FUNCTIONS . 'sessions.php');

 

comment this on line 141 to 154 (as in my project) may differ in your project.

 

and set

session_start() on every page.

When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Posted
Thank you very much Mr. Praful Kumar. It is working.

 

Have a nice week end.

 

 

Your Welcome Dear senthil Kumar.

 

I am always available for helps those who works on oscommerce.

 

Happy weeken you toooo.

When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Archived

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

×
×
  • Create New...