// File name: session02.php // if a session does not yet exist for this user, start one session_start(); if (!$PHPSESSID) { session_register('body_color'); session_register('text_color'); } else if ((!$body_color) || (!$text_color)) { session_register('body_color'); session_register('text_color'); } // do something w/ POST vars $body_color = $sel_body_color; $text_color = $sel_text_color; ?>
As you can see, your BODY color is now echo "$body_color"; ?> and your TEXT color is now echo "$text_color"; ?>.
If you now feel your color selections are atrocious, please feel free to change your preferences.