I am very new when it come's to PHP I need to make a chessboard for school. I am using options to let them select the color of the board. What i have so far is that 1 half is white always. But where i'm stuck is how can i make PHP reconize the color they selected and make the chessboard that color. I also am not sure if i need to use CSS with it please help me i'm stuck.
<!DOCTYPE html>
<html>
<head>
<title>Schaakbord</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="schaakbord.css">
</head>
<body>
<form action="" method="GET">
<select name="kleuren">
<option name="kleur" value="geel">Geel</option>
<option name="kleur" value="rood">Rood</option>
<option name="kleur" value="blauw">Blauw</option>
<option name="kleur" value="groen">Groen</option>
<option name="kleur" value="paars">Paars</option>
<option name="kleur" value="roze">Roze</option>
<option name="kleur" value="bruin">Bruin</option>
<option name="kleur" value="oranje">Oranje</option>
<option name="kleur" value="wit">Wit</option>
<option name="kleur" value="grijs">Grijs</option>
</select>
<input type="submit" name="submit">
</form>
<br/>
<?php
if(isset($_GET["submit"])){
echo "<table>";
for($i=0;$i<8;$i++)
{
echo "<tr>";
for($u=0;$u<8;$u++)
{
if(($i + $u)%2 == 0o)
{
echo "<td></td>";
}
else {
echo "<th></th>";
}
}
echo "</tr>";
}
echo "</table>";
}
?>
</body>
</html>
body {
background-color:black;
}
td {
width:50px;
height:50px;
background-color:red;
}
th {
width:50px;
height:50px;
background-color:white;
}