Hi
i have file "config.inc.php" where i have all definied constants:
define("smiles_dir", "img/smiles1/")
etc....
and i have two global variables:
global $screen_width;
global $screen_height;
this file is included in index.php file:
include ("config.inc.php");
in index.php file other files are dynamic included depend on querystring and in other include file (this file is included in index.php) i have function that check for me screen resolution:
if (!$screen_width || !$screen_height)
{
$screen_width = $GET["width"];
$screen_height = $GET["height"];
}
if (!$screen_width || !$screen_height)
{
echo "<script language=\"JavaScript\">getscreenresolution()</SCRIPT>";
}
else
{
$screen_size = $screen_width . "x" . $screen_height;
}
Function from javascript redirects to the same page with additional &width=1152&height=864 parametres. Everything works fine.
How can i do that $screen_width and $screen_height will be set one time (if user open site first time) and how can i get these data from $screen_width and $screen_height variables in config.inc.php these variables are set as global.
Thx