Hide form with php on submit?
<p>I have a simple php - password protecton / login based on a form which works. PHP-code is in page "secure.php" and includes the html-file "accessed.html" when user + pass is correct.</p>

<p>But i want the form to hide when hidden page (accessed.html) is shown. 
I have tried wrapping the form in a div and using javascript and display: none to hide, but it doesnt work - not locally or on server. </p>

<p>What am i doing wrong? It doesnt have to be js hiding the form after login..</p>

<p>PHP in top </p>

<pre><code>    &lt;?php
$user = $_POST['user'];
$pass = $_POST['pass'];

if($user == "a"
&amp;&amp; $pass == "a")
{
        include("accessed.html");
         echo "&lt;script&gt;
                    document.getElementById('wrap').style.display = 'none';
                &lt;/script&gt;";
}

if(isset($_POST))
?&gt;
</code></pre>

<p>And the form in the body:</p>

<pre><code>    &lt;div id="wrap"&gt;
    &lt;form method="POST" action="secure.php"&gt;
        User &lt;input type="text" name="user"&gt;&lt;/input&gt;
        Pass &lt;input type="text" name="pass"&gt;&lt;/input&gt;
        &lt;input type="submit" name="submit" value="access page"&gt;&lt;/input&gt;
    &lt;/form&gt;
&lt;/div&gt;
</code></pre>
