In need of a Cookie

I am working on a new site, and I have already created 4 different color schemes for it, sorta like the forums here. I was wondering on how to create a cookie js to store the user selection, and then apply that code to a button in flash…:q:

http://overrated.enervated.com/index.php?c=red
http://overrated.enervated.com/index.php?c=blue
http://overrated.enervated.com/index.php?c=green
http://overrated.enervated.com/index.php?c=orange

I created a string query with php to make this easier, but I am still having troubles…thanks in advance…

Does this help any?

http://www.spoono.com/tutorials/php/cookies/

I understand what Spoono is saying, but where would I set the cookie?

<? 
$page = $_GET["c"]; 
if (($c == "red") or ($c == "")) { 
       include("index.html"); 
} else if($c == "blue") { 
       include("indexb.html"); 
} else if($c == "green") { 
       include("indexg.html"); 
} else if($c == "orange") { 
       include("indexo.html"); 
} 
?> 

This is all index.php consists of, any idea?

Im not PHP expert man, I don’t know any PHP, but I am guessing you can create a function in PHP that will set a cookie depending on the value in the function parameter…

I don’t know PHP syntax, but I am going to take a shot…

function applyCookie(cookieValue) {
setcookie ("cookie", cookieValue);
};

And then on your button you call the function like…

applyCookie(“blue”);

Or something like that. This is about as much as I can help you on this subject. Sorry.

Alright man, thxs. I will work with and get it eventually :smiley: