I just realized that when you include() your theme file, you will not be able to set your new cookie because output will already be sent to the browser.
__________________
<mgraphic /> - I don't have a solution but I admire the problem.
Alright, I made a mistake. This will allow you to set a new theme and the comments show what is going on...
PHP Code:
<?php
// Set default $theme = 'naruto';
if (isset($_POST['theme']) AND file_exists('theme/' . $_POST['theme'] . '.txt')) { // Set to new selected theme from previous form $theme = $_COOKIE['theme']; } else if (isset($_COOKIE['theme']) AND file_exists('theme/' . $_COOKIE['theme'] . '.txt')) { // Set to current cookie selected $theme = $_POST['theme']; }