Advertisement
Guest User

Untitled

a guest
Jun 13th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.21 KB | None | 0 0
  1. <?php
  2.     include "header.php";
  3. ?>
  4.     <body>
  5.         <div id="main">
  6.             <div id="banner">
  7.                 <!-- Put this into the image instead of into html -->
  8.                 <h2>Out of my Geeky Mind</h2>
  9.                 <h4>:thoughts from the mind of a geeky girl;</h4>
  10.             </div>
  11.             <div id="content">
  12.     <?php
  13.         if (isset($_REQUEST["user"])){
  14.             $user = $_REQUEST["user"];
  15.         } else {
  16.             echo "user not set";
  17.         }
  18.         if (isset($_REQUEST["password"])){
  19.             $password = $_REQUEST["password"];
  20.         } else {
  21.             echo "password not set";
  22.         }
  23.         if ($user == "admin" && $password == "password"){
  24.     ?>
  25.                 <form action="post_confirm.php" method="post">
  26.                     <div>
  27.                         Title:
  28.                         <input type="text" name="title" /> <br />
  29.                         <textarea name="body" rows="25" cols="75"></textarea>
  30.                         <input type="submit" value="Submit New Post" />
  31.                     </div>
  32.                 </form>
  33.     <?php
  34.         } else {
  35.     ?>
  36.                 <h2>The username or password you entered is invalid. Try again.</h2>
  37.                 <div id="admin">
  38.                     <form action="new.php" method="post">
  39.                         Login:                 
  40.                         <input type="text" name="user" />
  41.                         <input type="password" name="password" />
  42.                         <input type="submit" value="Login" />
  43.                     </form>
  44.                 </div>
  45.            
  46.     <?php
  47.         }
  48.     ?> 
  49.             </div>
  50.         </div>
  51.     </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement