Hey,

I'm somewhat new to PHP and I'm doing a lot of forms stuff. Looking at some of the examples at:

http://www.linuxguruz.org/z.php?id=33

The variables seem to persist through a reload. For example, the first demo has:

----
<?
if (!isset($pick)) {
echo "Fill out and submit the form below."; }
else {
$j = count($pick);
for($i=0; $i<$j; $i++) {
echo "Pick <b>$pick[$i]</b> is Checked<br />"; }
}
?>

<form action="<? echo $PHP_SELF; ?>">
<ol>
<li>Painting<input name="pick[]" type=checkbox value="Painting" /></li>
<li>Plumbing<input name="pick[]" type=checkbox value="Plumbing" /></li>
<li>Electric<input name="pick[]" type=checkbox value="Electric" /></li>
</ol>

<input type="submit" value="Submit!" />
<input type="reset" value="Reset" />
</form>
--------

So the $pick variable is maitained through the submit. When I demo the script on that site, it works as advertised. When I use the same code on my web server, it doesn't work ($pick is never set after submitting). Is there some configuration option that dictates whether variables persist in this manner?

Thanks,
Dave


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to