A
Anonymous
Guest
Hey I am using a script to change images on my site when a skin is set.. But it isnt changing? please help me
It will only change the images to what ever i have set as defualt
Code:
<?
// the skin variable is set, so let´s set the cookie.
if ($HTTP_COOKIE_VARS['skin']!=""){
global $skinpath, $skincolor, $skintitle;
$cookieval = $HTTP_COOKIE_VARS['skinval'];
include "connect.php";
// select form the DB a skin with that value ($cookieval).
$result = mysql_query("SELECT * FROM skin WHERE id='$cookieval'");
$row = mysql_fetch_array($result);
// set the cookie
setcookie ($row[ck_name],$row[ck_value],time()+60*60*24*30,"/");
// Feel the skin vars with the corresponding info
$skinpath = $row[ck_skpath];
$skincolor = $row[ck_skcolor];
$skintitle = $row[ck_sktitle];
mysql_close();
}
// If the cookie was not set, it will put a default skin
else{
$skinpath = "images";
$skincolor = "blue";
$skintitle = "blue";
}
?>
<html>
webpage shit here and that
It will only change the images to what ever i have set as defualt