I want the output inside my variable msg4, which is linked to my html file, to have green color if an else statement occurs. I can't do it in render_template because if the else statement does not occur, the font color of the message will be red, as I wrote on my css file. It would be great if I could change my css file just when this else statement is called, because this msg4 would be the final output then. Here is the else statement with the message I want to give green color:
else:
# If the form data is valid, now update user table
cursor.execute("UPDATE user SET FirstName = %s, LastName = %s, Email = %s WHERE UID = %s", (firstName, lastName, email, id))
mysql.connection.commit()
msg4 = 'Changes successfully saved!'