PHP Classes

File: fwphp/glomodul/z_examples/ora11g/ACXE2/index.php

Recommend this page to a friend!
  Classes of Slavko Srakocic   B12 PHP FW   fwphp/glomodul/z_examples/ora11g/ACXE2/index.php   Download  
File: fwphp/glomodul/z_examples/ora11g/ACXE2/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change: Update of fwphp/glomodul/z_examples/ora11g/ACXE2/index.php
Date: 1 year ago
Size: 1,354 bytes


Class file image Download
// requires PHP >= 5.3
// H:\dev_web\htdocs\t_oci8\ACXE2\index.php
// http://dev:8083/t_oci8/ACXE2/index.php
session_start(); // before any output is created
$sess = new \Equipment\Session;
$sess->clearSession(); // = logout = allows the file to serve as a logout page
if ( !isset($_POST['username']) ) {
$page = new \Equipment\Page;
$page->printHeader("Welcome to AnyCo Corp.");
<div id="content">
         <h3>Select User</h3>
         <form method="post" action="index.php">
            <input type="radio" name="username" value="admin">Administrator<br />
            <input type="radio" name="username" value="simon">Simon<br />
            <input type="submit" value="Prijava">
// Important: dont have white space on the 'EOF;' line before or after the tag

} else {
// i s s e t($_ POST['user name']
if ($sess->authenticateUser($_POST['username'])) {
$sess->setSession(); // usr name, mast. start row
header('Location: emp_tbl.php');
    } else {
header('Location: index.php');