text size
| From: | Ross | Date: | Thu, 12 Jan 2006 13:34:29 +0000 |
| Subject: | text size | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-228523@lists.php.net to get a copy of this message | ||
Hi,
I have a variable called $text_size which can be "small", "medium" or
"large".
The value is submitted by a text link
a href="<? $_SERVER['PHP_SELF']; ?>?text_size=small"
class="size1">A</a>
<a href="<? $_SERVER['PHP_SELF']; ?>?text_size=medium"
class="size2">A</a>
<a href="<? $_SERVER['PHP_SELF']; ?>?text_size=large"
class="size3">A
At the start of the page I initialise it to "small" if it hasn't been set
$text_size = isset($_GET['text_size'] ) ? $_GET['text_size'] : 'small'
What I want to do is store the most current value for $text_size in a
session $_SESSION['text_size'] and then if I move to the next page start a
session and use the strored value so the value is not reset on every page.
R.