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> <script type="text/javascript"> var width; width = screen.width; if (width > 0) { location.href = "b.php?width=" + width; } else exit(); </script> Code (markup): b.php <?php if($_GET['width']) { public $screen_width; $screen_width=$_GET['width']; } else { include("a.php"); } ?> <?php if($_GET['width']) { public $screen_width; $screen_width=$_GET['width']; } else { include("a.php"); } ?> PHP: c.php <?php global $screen_width; if($screen_width>1024) { ..... } else {... } ?> <?php global $screen_width; if($screen_width>1024) { ..... } else {... } ?> PHP: 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=...
When a visitor visits c.php I want php to go to b.php and send the variable to c.php ,Is that possible using cookies