I have a web form that allows people to sign up for a class. At the bottom of the form is a submit button that says "Sign Up". In my PHP code, I am checking the number of people that have registered for the class. If the count is equal to a specific number, say 60 registrants, I want to change the button to be red and the text is changed to "Class is Full". How do I do this with a CSS if I can only define one button color?
This is my CSS:
button {
padding: 19px 39px 18px 39px;
color: #FFF;
background-color: #4bc970;
font-size: 18px;
text-align: center;
font-style: normal;
border-radius: 5px;
width: 100%;
border: 1px solid #3ac162;
border-width: 1px 1px 3px;
box-shadow: 0 -1px 0 rgba(255,255,255,0.1) inset;
margin-bottom: 10px;
}
button1 {
padding: 19px 39px 18px 39px;
color: #FFF;
background-color: #ff0000;
font-size: 18px;
text-align: center;
font-style: normal;
border-radius: 5px;
width: 100%;
border: 1px solid #3ac162;
border-width: 1px 1px 3px;
box-shadow: 0 -1px 0 rgba(255,255,255,0.1) inset;
margin-bottom: 10px;
}
In my PHP code, I have this:
<?php
$count = mysql_query("select count(*) from students;");
if ($count < 60){
echo'<button type="submit" name="signup">Sign Up';
}else{
echo'<button1 type="submit" name="">Class is Full';
}
?>
I know I can't use 'button1' in CSS, but how do I do it so it turns red and says class is full when $count = 60?