The answer from Ultimate is perfect and is what you need.
I'll explain you what is server and local validation.
Local validation is when you check the inputs in your html code or with javascript. Is fast because It is checked in the browser. But anyone visiting your page will be able to disable that validation with little technical skill.
Server validation is when you check the inputs in your php code. (the code that is between the <?php and ?>
). It is checked then, in the server. So anyone visiting your page will not be able to disable that validation.
Anyway, I recommend using both. Because local validation is fast, and server validation is secure.
To add local validation, this link will explain it very well:
http://www.w3schools.com/html5/att_input_required.asp
[Make sure you have in the first part of your code the doctype set to use html5:
<!DOCTYPE html>
<html>
<head>
...blablabalblabla more html code...
Then your HTML with validation will result in something like this:
<form action="" method="post">
<ul id="register">
<li>
<input type="text" name="first_name" placeholder="First Name" required="required">
</li>
<li>
<input type="text" name="last_name" placeholder="Last Name" required="required">
</li>
<li>
<input type="email" name="email" placeholder="Email" required="required"><br><br>
</li>
<li>
<input type="password" name="password" placeholder="Password" required="required">
</li>
<li>
<input type="radio" name="sex" value="male" required="required">Male
<input type="radio" name="sex" value="female" required="required">Female
</li>
<li>
...
And that's html5 local validation.