So after reviewing some tutorials on how to change text size and creating my own using PHP I was wondering how can I have my text size remembered across many different pages on my web site using PHP SESSIONS
?
Here is the PHP text sizer code below.
$size = 100;
if(isset($_GET['i']) && is_numeric($_GET['i'])) {
$s = $_GET['i'];
}
if($s == TRUE){
$size = ($s * 1.2);
}
if(isset($_GET['m']) && is_numeric($_GET['m'])) {
$m = $_GET['m'];
}
if($m == TRUE){
$size = ($m * 0.8);
}
if(isset($_GET['n']) && is_numeric($_GET['n'])) {
$n = $_GET['n'];
}
if($n == TRUE){
$size = 100;
}
Here is the CSS code.
#content {
font-size : <?php echo $size; ?>%;
}
And here is the xHTML.
<a href="index.php?i=<?php echo $size; ?>" title=""> Increase</a><br />
<a href="index.php?m=<?php echo $size; ?>" title=""> Decrease</a><br />
<a href="index.php?n=<?php echo $size; ?>" title=""> Normal</a><br />