Re: CGI::Session with MySQL Driver
- From: Fabian Pilkowski <pilkowsk@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 May 2005 14:53:14 +0200
* Alexandre Jaquet schrieb:
> Mark Clements a écrit :
>> Alexandre Jaquet wrote:
>>> Mark Clements a écrit :
>>>> Alexandre Jaquet wrote:
>>>>>
>>>>> $SESSION = new CGI::Session( "driver:MySQL", undef, { Handle=>$dbh} );
>>>>> $SESSION->store($dbh,$SESSION->id,'',"user_name => $username");
>>>>
>>>> Don't use store, use param.
>>>
>>> That's what I've try first it's doesn't store value key pair
>>> user_name $username ...
>>
>> Show us your code using param.
>
> sub login {
> my $username = param('user_name');
> my $userpassword = param('user_password');
[...]
> $CGI::Session::MySQL::TABLE_NAME = 'session';
> my $SESSION = new CGI::Session( "driver:MySQL", undef, {Handle => $dbh} );
> @my_array = ("$username");
> $SESSION->param("user_name", \@my_array);
This creates a new session since the second param to new() is undef. The
param()-call should set the value for "user_name" in *this* session. It
seems to be all right.
How do you verify that this value is not saved in your session? Do you
look into the database by hand, don't you?
I assume your problem is to get back this session instead of creating a
new one each time your script is called. Could this be?
regards,
fabian
.
- Follow-Ups:
- Re: CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- Re: CGI::Session with MySQL Driver
- References:
- CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- Re: CGI::Session with MySQL Driver
- From: Fabian Pilkowski
- Re: CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- Re: CGI::Session with MySQL Driver
- From: A. Sinan Unur
- Re: CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- Re: CGI::Session with MySQL Driver
- From: Mark Clements
- Re: CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- Re: CGI::Session with MySQL Driver
- From: Mark Clements
- Re: CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- CGI::Session with MySQL Driver
- Prev by Date: Re: How do I ask the user for a password?
- Next by Date: Re: CGI::Session with MySQL Driver
- Previous by thread: Re: CGI::Session with MySQL Driver
- Next by thread: Re: CGI::Session with MySQL Driver
- Index(es):
Relevant Pages
|
|