CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
passing hidden values with submit - help please

 



kind1
Deleted

Feb 17, 2000, 2:57 PM

Post #1 of 2 (510 views)
passing hidden values with submit - help please Can't Post

Ok, basically I have a cgi script where the user is interacting by entering info into fields and hitting a submit button, and the action is that it is posting to itself. The page content changes depending on what is entered into what fields. Is there a way to submit additional information that the user wont be able to see?

For example, there is a place you can look up stock quotes with just one field for the ticker. When the user hits submit, the value in the field will submit, but can I also submit other values (independent of the stock ticker value) that are totally invisible to the user?

The problem is cgi scripts apparently initialize all the variable values to "" each time a script submits to itself, and I need to keep a couple variables within the script (accountid and nickname) so I need to be able to transparently resubmit those.

Is this possible, and if so, how? or perhaps a different method that can accomplish the same thing - which is keeping variable values constant when a script submits to itself.

Thanks a lot - kind1


darian
Deleted

Feb 18, 2000, 10:23 AM

Post #2 of 2 (510 views)
Re: passing hidden values with submit - help please [In reply to] Can't Post

You could simply add the information to hidden fields in the form.

<input type="hidden" name="acctid" value="$acctid">

or you could store that information in cookies. The form version would be less secure. Of course you could always have a database file with all of their information and store a simple cookie on their system and then have your program look for the cookie and pull out the neccasary information from the database each time your program submits to itself. This would take longer but I think it would be more secure then the other two ways. Hope this helps.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives