Home  |  Linux  | Mysql  | PHP  | XML
From:Rene Schickbauer Date:Tue Dec  1 11:50:36 2009
Subject:Re: Saving param after new recall of a cgi script
Marek wrote:

Hi!

> How do I save the parameters from the first input? I tried everything,
> but there is nothing kept in my array. Do I have to save these
> parameters into an external file?

You could also use Storable & Base64 to encode your data structure into
a Base64 string. Put this string into a hidden text field. When the
second form is submitted, you can decode your original data structure
from that hidden field.

That way, you don't have to store ANYTHING on your server until the user
hits the final SUBMIT.

Something like this could do the trick:
<http://search.cpan.org/~cavac/Maplat-0.9/lib/Maplat/Helpers/DBSerialize.pm>

I originally wrote it to store perl data structures into a database text
field, should work in a hidden HTML form, too. Something like this:

<input type="hidden" name="foo" value="YourEncodedString">


LG
Rene
Navigate in group perl.beginners.cgi at sever nntp.perl.org
Previous Next


Your recent visits
Showing errors with user input
Re: cgi and perl database interaction
LMPX.COM :: Linux, Mysql, Php, Xml



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants