Re: ["solved"] Are variables persistent?
| From: | Paul Furman | Date: | Tue, 17 Feb 2004 17:11:36 +0000 |
| Subject: | Re: ["solved"] Are variables persistent? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177980@lists.php.net to get a copy of this message | ||
followup...
Paul Furman wrote:
Ugh, I think I'm done for the day. header() requires output buffering which would span several files and sounds like another mess.Well, for now, I set up some of the links to maintain the $pics variable in the url as a $_REQUEST and circumvented the header() mess with a url constructed from the returned $_REQUEST value that has to be clicked to proceed: http://hills.ccsf.edu/~pfurma02/index.php?SCREEN=settings.php&PICS=6 It works. The settings link is way at the bottom of all pages. and my code below: <h1>Change Settings</h1> <center> <div class="textbox"> <?php if (isset ($_REQUEST ['PICS'])){ $pics = $_REQUEST ['PICS'];} if ($_POST){
if (isset ($_POST['thumbs'])){
$pics = $_POST['thumbs'];
print "<a href=\"index.php?PICS="
.$pics."\">return to gallery index with ".$pics
." thumbnails per page</a> note that only the top logo home linkwill preserve this setting while navigating the site and visiting links from the navigation bar at the bottom will reset to default";
}
} ?>
<form name="mail" action="<?php SCREEN_DIR . "/settings.php" ?>" method="post">
<label for="thumbs">number of thumbnails per page: </label>
<input type="text" name="thumbs" id="thumbs" size="2"
value="<?php print $pics ?>">
<button type="submit">OK</button>
</form>
</div>
</center>