I have 3 pages a.php ,b.php and c.php .How can I use the variable of b.php in c.php
a.php
<script type="text/javascript">
var width;
width = screen.width;
if (width > 0) {
location.href = "b.php?width=" + width;
} else
exit();
</script>
b.php
<?php
if($_GET['width'])
{
public $screen_width;
$screen_width=$_GET['width'];
}
else
{
include("a.php");
}
?>
c.php
<?php
global $screen_width;
if($screen_width>1024)
{
.....
}
else
{...
}
?>
Help me guys,I can't use include() since a.php has js that keeps reloading everytime and c.php will be redirected to c.php?width=...