Never rely on Javascript of any form of Client Side Validation it shouldnt be trusted as its the client.
You need to put some sort of validation so e.g.
Empty Fields,
Invalid Entries e.g. Alpha characters in a numeric field
SQL Injections, XSS Security precautions. There are many things you can do
emty() for empty fields etc. Id suggest taking a look at the String Functions in the PHP Manual [man]Strings[/man]