What is the better and secure way to login and logout in PHP? : <p>I'm a beginner in PHP. my login page is a <strong><em>login.html</em></strong> page and it posts inputted data to a <strong><em>logged.php</em></strong> page. and in this page it checks inputted data with my DB and if it was true, it showed this <strong><em>logedd.php</em></strong> page or if not, it returns to <strong><em>login.html</em></strong> page with the code below:</p>

<pre><code>header('Location:Login.html');
</code></pre>

<p>and also when I press Logout icon in <strong><em>logged.php</em></strong>, it returns to <strong><em>login.html</em></strong> by a href link in it. like this:</p>

<pre><code>&lt;a href="login.php" target="_self"&gt; press to logout &lt;/a&gt;
</code></pre>

<p>Now my question is, Is this login and logout way secure or not? if not please describe why and how to make it secure? thanks.</p>
