Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set("session.cookie_httponly", "True"); <<<< Enable HttpOnly.
- session_start();
- session_regenerate_id();
- if(!isset($_SESSION['admin_loggedin']))
- {
- header('Location: index.php');
- }
- if(isset($_GET['search']))
- {
- if(!empty($_GET['search']))
- {
- $text = $_GET['search'];
- }
- else
- {
- $text = "No text Entered";
- }
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Admin Home</title>
- <link rel="stylesheet" href="styles.css">
- </head>
- <body>
- <div id="home"><center>
- </br><legend><text id=text><text id="text2">Welcome to Dashboard...</text></br></br> You are logged in as: <?php echo $_SESSION['admin_loggedin']; ?> <a href="logout.php">[logout]</a></text></legend></br>
- <form action="" method="GET">
- <div id="search">
- <text id="text">Search Values</text><input type="text" name="search" id="textbox"></br></br>
- <input type="submit" value="Search" name="Search" id="but"/>
- <div id="error"><text id="text2">You Entered:</text><?php echo $text; ?></div>
- </div>
- </form></center>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement