• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
session not working?

#1
Login.php
-------------

i stored the value
PHP Code:
$_SESSION['logvalue']="89"

Redirect.php
---------------
PHP Code:
echo " -  - "$_SESSION['logvalue']; 


This is working on local Apache server. but not working on PLESK and 000Webhost..?
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: logvalue


Thanks..
Reply

#2
Why you just not using :

Code:
$this->session->set_userdata()
 
Or for CI4

Code:
$session->set()

Before it you must call the session library.
Hi! I am Jamil
Reply

#3
(02-18-2020, 07:59 PM)mjamilasfihani Wrote: Why you just not using :

Code:
$this->session->set_userdata()
 
Or for CI4

Code:
$session->set()

Before it you must call the session library.


Both ways work the same as i understand it, only difference between them being the CI session library has helper functions that makes things easier to do/work with.
 
In my case, I personally prefer pushing/deleting all my values to/from the $_SESSION variable (the way I learned way back in '03) and use the CI helper functions as needed.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.