Re: [PHP] Passing vars w/refresh w/register globals off?
From: Kim Steinhaug (kim_at_steinhaug.com)
To: firstname.lastname@example.org Date: Tue, 25 Nov 2003 20:13:25 +0100
Well first off all it is possible to post and get at the same time.
Dont know why you want to, but its kinda easy really :
<form name="myform" action="myscript.php?get1=a&get2=b" method="post">
<input type="hidden" name="jalla" value="balla">
You can submit this form several ways, with ordinary submit button, or with
If you really want to keep serving variables that shouldnt be visble in the
browser or in the html kode I guess the only way would be using cookies.
But if the variables are defined by the users input / behavior there is
the need of showing the variables one place or another.
You mentioned that there were up to a 100 variables to be passed here.
Was that pr user or in total? Sending like a 100 variables with GET would
be a bad idea all together, since there are limits on how many caracters the
URL can hold. Some years ago alot of browsers had a limit on 128 characters,
this is imporved by the years but still the only way to feed long sets of
is through post.
If all your variables can be stored on the server, assigning a unique ID to
session would make you able to store everything in the database as someone
mentioned earlier. This wasy all you need is pass the ID within the browser.
By checking the ID against the unique session on the server you will also
eliminate tampering with the data. Webpages that has like a 100 hidden
doesnt look very "professional", but hey - it works.
The other thing is that forms can also talk with eachother nicely, what I
the information you need for later in a form somewhere in the html page,
when you build the refresh url you just pick out the data you want to use
from the different form elements (document.form.variable.value).
I still havnt quite understood what you are accually asking for here, but
it seems like you dont know yourself, hehe