Here is what I want to do.
1) When a new user comes to my site I want to get a database handle for them that will be used as their $dbh for that session.
2) Time out the $dbh & connection if the user hasn't done anything within ? 15 min ?
3) Kill the $dbh and connection if the browser window is closed.

Here is the idea to do it.....
Include a 1 pixel frame at the top of the page with the target page being a .pl that gets the $dbh. Then passes it encrypted as a cookie (that will expire on browser or window close)(personally, I hate sites that leave cookies on my computer, and routinely delete them all!)
Then when I need the $dbh I'll use the $query->cookie() business.
Here are my questions:
1)Now I know I can kill the connection through a javascript OnWindowClose() funtcion, but is there a simular perl way?
2)If I don't specifically exit() the script that gets the $dbh will the connect stay open? Otherwise this whole idea will not work. If not how do I do it.

I am up for alternative methods, but anything to do with Appache is out. My service provider uses Zues.
Thanks, Robert V.

In reply to Another session state question by robertv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.