<?php session_start(); require_once 'function.php'; /*require_once 'Model/input.php';*/ spl_autoload_register(function ($class) { include "Model/" . $class . ".php"; }); $user = new input(); if (!$user->getSession() && !$user->getID()) { header("Location:Log_in.php"); exit; } $id = $user->getID(); require 'header/profile_header.html'; ?> <a class = "navbar-brand" href = "#"> Profile </a> </div> <div class="collapse navbar-collapse" id="navbar-collapse"> <ul class="nav navbar-nav navbar-right"> <li class="log-form"><a href="log_out.php" ><span class="glyphicon glyphicon-log-out licon"></span>Log Out</a></li> </ul> </div> </div> </nav> </section>
<?php session_start(); require_once 'Model/input.php'; $user = new input(); if (!$user->getID()) { header("Location:Log_in.php"); exit; } else { $id = $user->getID(); $DELETE = $user->delete($id); if ($DELETE) { ?> <script> alert("Data Successfully Deleted"); </script> <?php } header('location:profile_page.php'); }