<?php
	session_start();
	
	$userinput = $_POST['ccode'];
	$fix = substr($userinput, 0, 1);
	
	if($userinput == "yellow" or $userinput == "blue" or $userinput == "aqua" or $userinput == "black") {
		$ccode = $userinput;
	}	
	else {
		if($fix != "#") {
				$ccode = "#" . $_POST['ccode'];
		}
		else {
			$ccode = $userinput;
		}
	}
	
	$_SESSION['text-highlight_COLOR'] = $ccode;
	$_SESSION['text-highlight_FIX'] = $fix;
	
	header("Location: ./");
?>