Validating various input HTML forms
you should be using arrays to store your variable.
your coding if syntax are not indented and formatted well. 
https://stackoverflow.com/questions/253030/best-way-to-format-if-statement-with-multiple-conditions
it is better to use 

if ($_POST) { } 

/** rather than **/

if ($_SERVER["REQUEST_METHOD"] == "POST") { }


in your case.

if anything else read about PSR1 or PSR2 coding standard.


http://www.php-fig.org/psr/psr-1/
http://www.php-fig.org/psr/psr-2/