Re: Session Problem for more than 1 variable

2007-06-10 Thread metasan
Hi, I looked at your code. 1. When you store datas into session you use $this->data, this is good but it don t contains the vars you are looking for. $this->data['Login'] is ok because it contains the data provided by the form. 2. The vars you are looking for are in the $results tab. Try : $th

Re: Session Problem for more than 1 variable

2007-06-10 Thread Lemune
Thank you all I got the answer from irc. Metasan said that the data is empty on filed login_type_id and user_id (because it came from the form thtml), so I have to use the $resuls variable not the data, this is my new code: $this->Session->write('user',$this->data['Login']['username']); $this->S

Re: Session Problem for more than 1 variable

2007-06-10 Thread Lemune
Hi again. Sorry cause i just 2 days away. ErreUve I 'm also have try using your method.and this is my code: $this->Session->write('user',$this->data['Login']); $level=$this->Session->read('user.login_type_id'); if($level==1) { $this->redirect('/administrators/index'); exit(); }

Re: Session Problem for more than 1 variable

2007-06-08 Thread ErreUve
Hi, I'm new with cakephp and I try to write all the User model in the session. Why is better serialize? Is there any problem with the data? The read and write works properly. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Session Problem for more than 1 variable

2007-06-08 Thread Repsah
No, nevermind, I read what you were doing wrong. On 6/8/07, ErreUve <[EMAIL PROTECTED]> wrote: > > > Hi, > > I'm new with cakephp and I try to write all the User model in the > session. > Why is better serialize? Is there any problem with the data? The read > and write works properly. > > Thanks >

Re: Session Problem for more than 1 variable

2007-06-08 Thread Repsah
ErreUve, you're writing an array in session, I think you need to serialize it (check the php functions serialize and unserialize). On 6/8/07, ErreUve <[EMAIL PROTECTED]> wrote: > > > Hello all, > > I had the same problem. And I try wthis this: I put the 'User' in the > session and I read this at i

Re: Session Problem for more than 1 variable

2007-06-08 Thread ErreUve
Hello all, I had the same problem. And I try wthis this: I put the 'User' in the session and I read this at index.thml. I've a WAMP and my login controller is like yours: function login() { // If a user has submitted form data: if (!empty($this->data)) { $someone =$this->User->findByid

Re: Session Problem for more than 1 variable

2007-06-07 Thread Lemune
Ok. I had already try the simple code about session, and now its work for code : But for my code in the first post (my first question), it still don't work. for you who don't remember my code: This is my code: function log_in() { $this->set('error',false);

Re: Session Problem for more than 1 variable

2007-06-07 Thread Lemune
Ok. I will try. By the way WAMP that i think that you ask is WAMP installer that come from Roman Bourdon (Like php triad and XAMPP ). :-)) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post t

Re: Session Problem for more than 1 variable

2007-06-07 Thread Ketan Patel
Refer to http://cakeforge.org/snippet/detail.php?type=snippet&id=189 This has the sessions section for php.ini. Your setup is commonly known as WAMP (Windows, Apache, MySQL, PHP) Compare with yours and adjust accordingly! On Jun 7, 9:30 pm, Lemune <[EMAIL PROTECTED]> wrote: > I use neither of

Re: Session Problem for more than 1 variable

2007-06-07 Thread Lemune
I use neither of both. I use php-5.2.2-Win32, apache_2.2.4-win32-x86-no_ssl (Installer), mysql-5.0.37-win32 (Installer), cake_1.1.15.5144, and phpMyAdmin-2.10.0.2-english. Ketan Patel wrote: > I will send you my php.ini once i get home. What is your setup? WAMP > or LAMP? > > Ketan > > Lemune wro

Re: Session Problem for more than 1 variable

2007-06-07 Thread Ketan Patel
I will send you my php.ini once i get home. What is your setup? WAMP or LAMP? Ketan Lemune wrote: > Hello again. > I have tried your suggestion (Ketan Patel), and I don't see the > printout on 2nd visit. > Your suggestion is to fix it in php.ini. > I need help in this matters, because i don't kn

Re: Session Problem for more than 1 variable

2007-06-06 Thread Lemune
Hello again. I have tried your suggestion (Ketan Patel), and I don't see the printout on 2nd visit. Your suggestion is to fix it in php.ini. I need help in this matters, because i don't know what is to be fix. --~--~-~--~~~---~--~~ You received this message becaus

Re: Session Problem for more than 1 variable

2007-06-06 Thread Ketan Patel
First try writing a small php script: create temp.php in your 'DocumentRoot' Directory of your server (check httpd.conf for this path). Save following code to temp.php: Visit http://localhost/temp.php two times. For 1st time, it will be all blank. For 2nd time, if you see the printout- Sessio

Session Problem for more than 1 variable

2007-06-06 Thread Lemune
Hello all, I'm just begin using the cakephp. I'm trying to store 3 variable in session, but only the first one that can be read. This is my code: function log_in() { $this->set('error',false); if($this->data) { $res