State Machine
I want to approach this article on a practical way, if you want to know a little more theory, I found an article on wikipedia that could possibly be of your interest.
Read Finite state machine on Wikipedia
If you’re already bored of wikipedia here is the rest of the article:
Warning: Undefined variable $fields in /mnt/web022/e3/96/54323296/htdocs/wp-content/themes/profession/profession/comments.php on line 16