PHP Classes

File: admin/login.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Miguel Villaseņor  >  MKCS PHP Support Chat  >  admin/login.php  >  Download  
File: admin/login.php
Role: Example script
Content type: text/plain
Description: Example script
Class: MKCS PHP Support Chat
Chat with clients of a support site
Author: By
Last change: Update login.php
Date: 2 years ago
Size: 2,104 bytes


Class file image Download
require_once 'session_initializer.php';

$id=User::validateUser($_POST['username'], $_POST['password'])){
header('Location: index.php');
$message="Invalid credentials";


<!DOCTYPE html>
<html lang="es">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
        <link rel="stylesheet" href="../css/main.css">
        <script src="../js/jquery.min.js"></script>
        <script src="../bootstrap/js/bootstrap.min.js"></script>
        <script src="../js/main.js"></script>
        <title>Simple Support Chat Back End</title>
         <div class="container">
            <div class="well" id="main">
                <div class="row">
                <div class="col-md-4 col-md-offset-4">
                <form role="form" method="post">
                    <?php if(isset($message)) echo "<div class='alert alert-danger'>$message</div>" ?>
<div class="form-group">
                        <label for="name">Username </label>
                        <input type="text" class="form-control" id="username" placeholder="Full Name" name="username" />
                        <span class="help-block"></span>
                    <div class="form-group">
                        <label for="email">Password</label>
                        <input type="password" class="form-control" id="password" placeholder="Email" name="password" />
                        <span class="help-block">Try: admin/1234</span>
                    <input type="submit" value="Enter" class="btn btn-primary" />