im going to programm a Backend for one of my projects. Yesterday i made the login and logout function. In the Backed there is a navigation point calles logout:
if (isset($_GET['act'])) {
$selection = $_GET['act'];
switch ($selection) {
case "home":
include("include/home.php");
break;
case "registration":
include("include/registration.php");
break;
case "cusadm":
include("include/cusadm.php");
break;
case "history":
include("include/history.php");
break;
case "logout":
include("include/logout.php");
break;
default:
include("include/home.php");
logout.php
<?php
$_SESSION = array();
header('Location:index.php');
?>
my problem is now that f.e my form has now links and every link do a logout.
here is a screenshot:
http://s13.postimage.org/s4k7akc5j/problem.jpg
so how can i solve this problem?
Looks like you haven’t closed an anchor tag or something like that.
Check your markup: http://validator.w3.org