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 %}
......
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
{% 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"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
......
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