Re: CGI::Session with MySQL Driver



Alexandre Jaquet wrote:

> A. Sinan Unur a écrit :
> > Alexandre Jaquet <alexj@xxxxxxxxxxx> wrote in
> > news:429af5eb$0$1145$5402220f@xxxxxxxxxxxxxxx:
> >
> >
> > > I've read this doc, but it's doesn't seem to have example with
> > > new defined field
> > >
> > > I want to store user_name in session table
> >
> >
> > <url:
> > http://search.cpan.org/~sherzodr/CGI-Session-3.95/Session/Tutorial.p
> > m#CREATING_NEW_SESSION>
> >
> >
>
> nothing about storing data in database ...
>
> $SESSION = new CGI::Session( "driver:MySQL", undef, { Handle =>$dbh}
> ); $SESSION->store($dbh,$SESSION->id,'',"user_name => $username");
>
> store now return : Can't use string
> ("b7f26a2095fb2ff4e11e8ae1295d767e") as an ARRAY ref while "strict
> refs" in use at ...
>
> the string b7f26a2095fb2ff4e11e8ae1295d767e represent the sessionid
> what's wrong ?

You really don't read the documentation do you?

>From the tutorial that Sinan pointed you at:

@my_array = ("apple", "grapes", "melon", "casaba");
$session->param("fruits", \@my_array);

Don't use store, use param.

Don't make us read the docs for you.

Mark
.



Relevant Pages

  • Re: CGI::Session with MySQL Driver
    ... Sinan Unur a écrit: ... I want to store user_name in session table ... the string b7f26a2095fb2ff4e11e8ae1295d767e represent the sessionid what's wrong? ...
    (comp.lang.perl.misc)
  • Re: Interpolations within system()
    ... That is a single quoted string you are passing to system. ... Do read the posting guidelines for this group. ... Sinan Unur ...
    (comp.lang.perl.misc)
  • Re: Numeric or character ?
    ... at this point is *character* data. ... you have a string in $a and you are comparing it ... For more general numeric formats, ... Sinan Unur ...
    (comp.lang.perl.misc)
  • Re: perl bug with pos() and placing matches in an array?
    ... Sinan Unur wrote: ... I would like to find the position of the first match. ... I want to find the first match in the string, ... of the first match into an array, ...
    (comp.lang.perl.misc)
  • Re: perl array issue
    ... http://en.wikipedia.org/wiki/Code_ (cryptography): ... You do realize that backticks interpolate, ... before the string is passed to the shell. ... Sinan Unur ...
    (comp.lang.perl.misc)