[eluser]Twisted1919[/eluser]
I guess you have two ways of doing this .
1. Javascript - use jQuery and execute the form via ajax .
2. Use sessions to keep track of your validation, based on that, you would change the background of your field .
If i were you, i would stick to the first option which is more simple .