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

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!'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://128579]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2018-05-23 23:28 GMT
Find Nodes?
    Voting Booth?