Skip to content
Advertisement

put a class in the table according to the database

I have this table in phpmyadmin table and I already have the connection and the value is stored here $row["Risco"] and I have this table that are squares squares

and then I want to put the class extinction-active that changes the color of the square in the corresponding square that comes from the database

the goal is to change the color according to what is received from the database and I thought about using this way and maybe using a switch but I don’t know how to implement it …. I accept different proposals

Advertisement

Answer

already thought of a way, it gets big but it works

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement