Adjusted the form submition in php

Did some adjustments in the form variables and some validation