Moved processing to result.php