That's just the browser's cache, nothing to do with PHP. Not all browsers will cache succesfully. If you want to guarentee that variables will be stored for later retrieval (or for repopulating a form) then you need to use sessions or store the content of the variables in a database.
-Kevin ----- Original Message ----- From: "David Chamberlin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 12:58 PM Subject: [PHP] Variables that persist through reload? > 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 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php