|
You wouldn't want to do it in PHP, because PHP runs on the server and wouldn't know if anyone had clicked anything until it was asked to deliver a new page, and I suspect you don't want to reload the entire page just so that you can change the colour of a table cell. You can't do it in HTML because HTML isn't a programming language and so can't do anything.
You could do it in javascript: give the relevant <td> element an id attribute, and then Javascript can locate the cell with getElementById('whateveryoucalledit');
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
|