Im a php beginner but i have some object oriented programming[c++ java] experience.
My problem is that I want to make a table ( for use in a front end ) wich can do two things:
change the backgroundcolor of a particular space (like A2 turns red)
know what the last space (B1 , C4 or whatever) is clicked on.

For instance (like in a simple test) :
When somebody would click on B2 then it would write to a variable that the user clicked on B2
And then C3 would turn green.
So my questions are:
1 Is it possible in PHP that C3 then turns green without having the user pressing refresh
3 What is the best way too write the two functions.
2 Im really confused how to make the table, how should I write it that the table knows that for example c3 is clicked on? with a mouseevent or something?
Well thanx for reading this and ANY help or insights would be sincerely greatly appreciated.(You dont have to answer any my above questions of course
Thnx guyz!!