Compulsory Fields

Hey, I’ve created an email contact form on a web page for a client, using HTML and PHP.

Below is the code for the contact HTML page, and the mailer PHP page I’m using.

It works, but I need to make all the input fields compulsory. For instance if someone doesn’t put any details in any box, they receive some sort of error message and aren’t allowed to submit, or something similar.

Pages:

I have no idea what I have to do to make the fields compulsory, whether more coding on the existing pages is required, or if I have to create more pages.

Any help is appreciated! :slight_smile:

**EDIT: **Also, I’ve just encountered another php related problem…
Regarding another email contact form, with exactly the same format of coding as above, I’ve uploaded the html and php pages into two separate web spaces for testing. On one web space it works, emailing the query correctly to who it is supposed to. On another web space it doesn’t work, creating this error, “Incorrect function.”, when the Submit button is clicked.

Is it possible that one web space doesn’t allow PHP…?

I’ve uploaded exactly the same files in the correct directories. On one domain/web space it works, and on the other it doesn’t though.

…any ideas?