Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Saving CGI state to mySQL

by mitd (Curate)
on Nov 30, 2001 at 12:56 UTC ( #128579=note: print w/ replies, xml ) Need Help??


in reply to Saving CGI state to mySQL

There several approaches you can take and here is one.

First a quote direct from CGI::save method comment.

#### Method: save # Write values out to a filehandle in such a way that they can # be reinitialized by the filehandle form of the new() method ####
Ok with this knowledge in hand we can start.
  1. sub-class CGI (an example of this is CGI::Pretty look at it if you are not sure how to do this)
  2. two choices in your new sub-class, overide CGI::save method or creat a new save_db method either way 90% of the code you need is in original save method.
  3. Must overide CGI::new to handle case when previous state has been save using your new save_db form.
Hope this helps, good luck

mitd-Made in the Dark
'Interactive! Paper tape is interactive!
If you don't believe me I can show you my paper cut scars!'


Comment on Re: Saving CGI state to mySQL
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://128579]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (23)
As of 2015-07-02 18:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls