OVERVIEW: I have script which allows users to chose a background and this option is saved in the mysqlDB. This is then pulled at login and saved within the session.
Issue: The problem I am having is that in I.E. only the background shows and the web content does not. It works in chrome, and I have read up on different ways to show the background, but it seems to not be working. Is there anything wrong with my script?
Script:
<style> body { background: url('http://domain.co.uk/images/assets/<?php echo "".$_SESSION["USER"]["bg"]."" ?>.jpg') no-repeat top; } </style>
session start script
<?php
session_start();
if(!isset($_SESSION["USER"])){
header("Location: ../index.php");
}
?>
check login / gen session
if(mysql_num_rows($result) == 1){
while($user_data = mysql_fetch_array($result)) {
$_SESSION["USER"]["bg"] = $user_data["bg"];
My start session script and generate works, and I have posted the relevent snippits here
In fact
<style>must be included insidehead. Or you can just add attributestyle="background: url('http://example.com/images/assets/<?=$_SESSION["USER"]["bg"]?>.jpg"to<body>tag. I think that will help.