Fixed a PHP error and redirect location in the submit function.