When you make long pages of php that you are using multi variables in, I recommend declaring the variables at the top of the page like this
this makes the coding less confusing and easier to read
PHP:
<?php
if(isset($_POST["var1"])){$var1==$_POST["var1"]}
//Content
?>