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
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
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();
}
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
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
>
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
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
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);
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
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
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
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
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
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
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
15 matches
Mail list logo