Hi, I'm trying to do a grid which look like the famous reddit place /r/rplace
I have a table in my database which contain :
coo_x
coo_y
color
id
It's a 16x16 grid, I already filled up the database with a php script. so I have a database with 256 records in it, and the default color is white on every lines.
I wonder how I can do a grid by taking the coordinates in my database?
I already saw that I can use svg and rect; but I won't create 256 rectangle by hands, I'd like to take records from my database and automatically create a rectangle with the right coordinates.
Also, in order to change the color of it, do I have to make a onclick event on the rectangles? and then change the color?