I do this kind of thing quite a lot and it's good that you have client side validation and that you want to perform server side validation as well.
to validate the email address I would recommend using a regular expression similar to:
-
!empty($lcEmail) && ereg('^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*$', $lcEmail))
-
In this sample I have assumed that you have taken the email address supplied on the form out of the $_POST array and into a local variable.
This check ensures something has been entered and if so it checks that it is an email address.
In terms of name you can do something very similar. Though regular expressions can be a bot of overkill for something as simple and as variable as a name so just test the variable is not empty.
Finally, going a bit beyond the scope of the initial question have you thought about what to do if the server side validation fails? Personally I find it annoying if something happens and the server side validation fails and then I have to re-complete the form(worst-case scenario) or go back and hope the data is there to be corrected.
I recommend using some AJAX for this (technically pseudo AJAX with form submission) so that the issues can be displayed on the same page as the form and the user can then see what sis wrong, fix it and re-submit the form.
There are two ways to do this, one using an iFrame and normal form submission the other using a JS submission method.
I hope I've helped with the main question and given you some pointers for the next step. If you have any more questions pot them back here and I'll be sure to stop by.
Cheers
nathj