Commit d4d79fb6 by mhasan

logout

parent 6059c11c
<?php
session_start();
if( $_GET['logout'] == 'logout')
{
session_unset();
session_destroy();
header("location: ../index.php");
}
?>
\ No newline at end of file
...@@ -45,6 +45,9 @@ ...@@ -45,6 +45,9 @@
<input class='btn btn-success'type="submit" name="submit" value="submit"> <input class='btn btn-success'type="submit" name="submit" value="submit">
</form> </form>
<br> <br> <br> <br>
<form class='btn btn-success' method="GET" action="php/logout.php">
<input type = 'submit' name =' logout' value = 'logout'>
</form>
{% if login is not null %} {% if login is not null %}
<h3 style="text-align:center;"> Incorrect username and password, please try again!</h3> <h3 style="text-align:center;"> Incorrect username and password, please try again!</h3>
{% endif %} {% endif %}
......
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
{% else %} {% else %}
<h2 style="text-align: center; margin-top:80px"> Please log in </h2> <h2 style="text-align: center; margin-top:80px"> Please log in </h2>
{% endif %} {% endif %}
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment