Page 1 of 1

Passing variables without a form.

Posted: Sun Jun 29, 2003 1:29 pm
by php_wiz_kid
How do I pass a variable without having to go through a form. I just want to be able to click on a link and be able to display the values of the previous page without having to use form objects. Hidden forms just aren't practicle either. Thanks.

Posted: Sun Jun 29, 2003 1:30 pm
by nielsene
GET style URL mangling, cookies, or sessions.

Posted: Sun Jun 29, 2003 1:35 pm
by php_wiz_kid
What do you think the most secure way of doing this?

Posted: Sun Jun 29, 2003 1:43 pm
by nielsene
Any or all can be made secure. I personally prefer cookies or sessions; I dislike name-mangling as it makes for ugly urls, however, it does allow for customizations of what data from one page is passed to the next.

Sessions are definately more convienent, in m opinion, as you are only passing one piece of information around (the sessionid) with the other values staying on the server only, indexed by the sessionid. However the sessionid needs to be protected.

I suggest using a MAC (Message Authentication Code) on all values to be sent across the network. (For more information do a search for posts by me (nielsene) and the words MAC or security...