[thelist] passing a variable through a form using php
Richard Livsey
R.Livsey at cache-22.co.uk
Fri Sep 26 05:28:00 CDT 2003
Joshua Hmielowski wrote:
> what I am trying to achieve is to pass a variable ($value) to the same
> page that the form sits on "catalog.php"
> <form action="catalog.php">
> the form in which I am trying pass this var is a option list. I have
> set the values to pass with the correct option.
> the value does seem to get passed considering I can see it in the url
> "get"method.
> I wrote a test script to catch and test the variable. I am using the
> !isset() and the empty() functions to test the var.
> what I get is the var in NOT set. (the !isset returns true)
> any Ideas?
The value you are after will be in $_GET['select'], unless you have
register globals turned on (not advisable) in which case you will be
able to get it directly from $select.
If you replace $value in your statements() function with $_GET['select']
then the script should work as expected.
HTH
--
R.Livsey
Incutio Web Developer
www.cache-22.co.uk
www.incutio.com
More information about the thelist
mailing list