javascript - PHP: I want to make background picker that saves color into cookie


Keywords:javascript 


Question: 

I am new to PHP and i want to make color picker with buttons ([RED], [GREEN], [BLUE], etc.) that saves color into cookie, so when page reloads, the color stays.

I think i could save color as $variable and then it would be a lot easyer.

SORRY FOR MY BAD english

EDIT: PLS POST CODE. IT CAN BE ALSO IN JAVASCRIPT OR PHP/AJAX or just tell me how to set current bgcolor into $variable and then i will save it into cookie...


1 Answer: 

You could also just send the data with the get/post. Each time they use the page send the info in a loop till it changes. I think this would be much easier.