Why I get "Server Error" after this PHP if conditional?
===

I want to restrict any direct access to the results page, but I allow it if the user comes from the index.html. So I wrote the following code but it does not make the trick.

    $selected= $_POST['selected'];
        if empty($selected) {
        header('Location: index.html');
        }