Displaying styled validation messages to user
Why wait until the data has gone to the server before you inform the user that their name is empty?  You should be doing any processing up front that you can for performance reasons (though you'll still need to do validating from the server side for security reasons).  I recommend the addition of the required attribute:

&lt;input type="text" name="first_name" required /&gt;


You can even use CSS to inform the user that the field contains invalid data.

input:invalid {
    border: 1px solid red;
}


Learn more: http://www.html5rocks.com/en/tutorials/forms/html5forms/