Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 chanting in the Monastery: (15)
As of 2014-08-01 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (19 votes), past polls