You could have used the empty() function instead of
PHP Code:
If ($_POST["text"] == "" || $_POST["pass"] == ""){ echo '<script>alert("Please enter something into the text boxes!")</script>';