B.r.K.o.N.j.A. wrote:
is there a way to set _post variables without submitting a form?
something like
<?php
$_POST['var1']=123;
?>
<a href="something.php">link</a>
when user clicks on a link the something.php script can access
$_POST['var1']
Regards,
Vedran
It seems that what you want is for "var1" to exist and have the value 123
when the user goes to "something.php". Is this what you want? If so, then
the simplest is this:
<a href="something.php?var1=123">link</a>
....and then the variable will be in $_GET instead of $_POST, but what's the
difference?
If you want to get more complicated, you will need javascript, which IMHO is
actually a very good thing. In my world all of my users have this so it is
not a problem, but in some circles that would be a problem.
--
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec)ure(Dat)a(.com)