PHP Classes

File: fwphp/glomodul/z_examples/book_video/auction_wrox24h_30/content/login.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/glomodul/z_examples/book_video/auction_wrox24h_30/content/login.php  >  Download  
File: fwphp/glomodul/z_examples/book_video/auction_wrox24h_30/content/login.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change:
Date: 3 months ago
Size: 1,229 bytes


Class file image Download
 * login.php
 * Login
 * @version 1.2 2011-02-03
 * @package Smithside Auctions
 * @copyright Copyright (c) 2011 Smithside Auctions
 * @license GNU General Public License
 * @since Since Release 1.0

<form action="index.php" method="post" name="maint" id="maint">

  <fieldset class="maintform">
      <li><label for="user_name" class="required">User Name</label><br />
        <input type="text" name="user_name" id="user_name" value="msmith" class="required" /></li>
      <li><label for="password" class="required">Password</label><br />
        <input type="password" name="password" id="password" value="12345678" class="required" /></li>

// create token
$salt = 'SomeSalt';
$token = sha1(mt_rand(1,1000000) . $salt);
$_SESSION['token'] = $token;
<input type="hidden" name="task" id="task" value="login" />
    <input type='hidden' name='token' value='<?php echo $token; ?>'/>
    <input type="submit" name="login" value="Login" />
    <a class="cancel" href="index.php">Cancel, return to Home Page</a>

<hr />
<span style="font-size:small;"><?=__FILE__?></span>

For more information send a message to info at phpclasses dot org.