Re: CGI::Session with MySQL Driver
- From: Alexandre Jaquet <alexj@xxxxxxxxxxx>
- Date: Mon, 30 May 2005 14:56:02 +0200
Fabian Pilkowski a écrit :
* 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
hi fabian, yes I look it by doing a sqlquery to verify, but the field user_name is alway empty
first I want to make my datas persistent into the db then I will check out if exising session can be reopended
.
- Follow-Ups:
- Re: CGI::Session with MySQL Driver
- From: Fabian Pilkowski
- 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
- Re: CGI::Session with MySQL Driver
- From: Fabian Pilkowski
- CGI::Session with MySQL Driver
- Prev by Date: Re: CGI::Session with MySQL Driver
- 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
|
|