Hi,
I am trying to make a page where the footer is loaded according to the screen size, so if someone is accessing the website via a tablet will be a footer, if it is from the computer, there will be another footer.
my problem is that although it is recognizing the windows width, it is not changing the footer accordingly.
this is my code:
$width = "<script>document.write(window.innerWidth);</script>";
if ($width < 900)
{
include("footer_mobile.php");
}
else
{
include("footer.php");
}
for some reason it is always loading the else footer even though the windows with changes.
I added echo"$width" ; and the result of the variable was fine.
does anyone know what the problem is cause it is driving me crazy?