...

View Full Version : Can you pass hidden data between pages without using a form?



bazz
05-29-2005, 05:24 PM
Hi,

I am trying to pass hiden data between a series of pages and want to do it so that the data is njot in the url.

I would rather not use a form with hidden data and wondered, is it possible to do something like this (but which works)?

<a href=""><input type="hidden" name="name" value="">hyperlink</a>


Bazz

quentin
05-29-2005, 06:09 PM
do you think it works with :

<a href="!!!"><input type="submit" id="go" value="go" />hyperlink</a>

? :-)

bazz
05-29-2005, 06:39 PM
er, doubt it: that would give me a button wouldn't it? I just want to have a straightforward hyperlink but which passes data otherwiase than through the url.

Coastal Web
05-29-2005, 10:43 PM
yay l dont think so ... perhaps using sessions with PHP, this wouldn't "hide it" per se, but would definetly encode it and 'hide' the contents...

so your variables would be stored in the session id, and would end up looking like:

<a href="page2.html?sid=abecffaa52f529a2b83b6612a7964b02">go to page 2</a>

of course PHP would append the "?sid=xxxx" to the end of all your links, which would contain all of the information you'd like to carry on from page to page.

more info on sessions:
http://us3.php.net/session

HTHs
Samantha Gram

bazz
05-31-2005, 04:51 PM
Thanks Samantha,

I'll check it out.

Bazz

FishMonger
06-01-2005, 12:01 AM
Since most of your other questions (and scripts) involve Perl, you shoulld look at the cpan modules.

use CGI::Session;
http://search.cpan.org/~sherzodr/CGI-Session-3.95/Session.pm

use Apache::Session::MySQL;
http://search.cpan.org/~jbaker/Apache-Session-1.6/Session.pm

There are others, doing a search for session found these:
http://search.cpan.org/search?query=session&mode=all

Willy Duitt
06-01-2005, 12:26 AM
window.name



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum