How to add validation to Form Mailer

Hi,

I am new to PHP and I found a really great tutorial here:

http://www.kirupa.com/web/form_mailer.htm

I just need to know how to add validation to the fields to make sure people fill in the first 2 fields.

Any help on this would be greatly appreciated :thumb:

Thanks in advance