Change php header using switch case
<p>I want to redirect to other page based on the selected string in combo box.</p>

<p>I have added following code:</p>

<pre><code>switch ($downloadType){
    case "text1":
        header("Location:pdf/text1.pdf");
        break;
    case "text2":
        header("Location:pdf/text2.pdf");
    case "text3":
        header("Location:pdf/text3.pdf");
    default:
        header("Location:index.html");
}
</code></pre>

<p>But this simple script is not working. I am new to php. Do you have any idea why I am not able to change header. Is it like we cannot change header using switch-case statements.</p>

<p>If this is not the way then what could be the possible way to redirect to another page on form submission.</p>
