This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="post"> | |
<select name="cell" size="1"> | |
<option></option> | |
<option value="a">A</option> | |
<option value="b">B</option> | |
<option value="c">C</option> | |
</select> | |
<input name="submit" type="submit" value="Submit"> | |
</form> | |
<style type="text/css"> | |
<!-- | |
table td { | |
border: 1px solid; | |
} | |
<?php | |
if (isset($_POST['cell'])) | |
{ | |
echo "td.{$_POST['cell']} {background:yellow;}"; | |
} | |
?> | |
--> | |
</style> | |
<table> | |
<tr> | |
<td class="a">Cell A</td> | |
<td class="b">Cell B</td> | |
<td class="c">Cell C</td> | |
</tr> | |
</table> |