Logout.php March 16, 2018 <?php session_start(); session_destroy(); header("location:index.php"); ?> Share Get link Facebook X Pinterest Email Other Apps Share Get link Facebook X Pinterest Email Other Apps Comments
index.php March 16, 2018 <?php include('server.php') ?> <!DOCTYPE html> <html> <head> <script type="text/javascript" src="pdo.js"></script> <link rel="stylesheet" type="text/css" href="pdo.css"> <title>PDO Registration forms </title> </head> <body> <?php if(isset($message)) { echo '<label class="text-danger">'.$message.'</label> '; } ?> <h2> PHP login using PDO</h2> <form method="POST" action="index.php"> <div class="inputs"> <label>Enter your username </label> <input type="text" name="username"> </div> <div class="inputs"> <label> Enter your Password</label> <input type="Password" name="password"> </div> <div class="inputs"> <i... Read more
Login_success.php March 16, 2018 <?php session_start(); if(isset($_SESSION['username'])) { echo '<h3> You are successfully logged in, '.$_SESSION["username"]. ' </h3>'; echo '<br /><br/><a href="logout.php">Logout</a>'; } else{ header("location:index.php"); } ?> Read more
Comments
Post a Comment