PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Saeed Ahmed   Simple login and database module   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: sample file
Class: Simple login and database module
Authenticate users with records in a MySQL table
Author: By
Last change: some unwanted code are removed
Date: 13 years ago
Size: 885 bytes


Class file image Download
 * file name : login.class.php
 * class name : login
 * pupose: for login module, database connectibity, query execution and fetch data from database
 * author : saeed ahmed
 * contact email:
 * website:
 * License : GPL

include_once 'login.class.php';

$obj = new Login();

$_GET['val']) && $_GET['val'] == '0') {

if(isset (
$_POST[submit])) {

$response = $obj->login_user($_POST['username'],$_POST['username']);

<form action="sample.php" method="POST">
    username : <input name = "username" type="text" /><br/>
    password : <input name = "password" type ="password" /><br/>
    <input name ="submit" type ="submit" value ="login" />

<?php if(isset($response)) echo "<h4>" . $response . "</h4>"; ?>