Variables that persist through reload?

From: Date: Fri, 03 Jan 2003 19:58:36 +0000
Subject: Variables that persist through reload?
Groups: php.general 
Request: Send a blank email to php-general+get-130147@lists.php.net to get a copy of this message
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

« previous php.general (#130147) next »