Login   Register  
PHP Classes

File: demos/demo5.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Giovanni Ramos  >  PDO4You  >  demos/demo5.php  >  Download  
File: demos/demo5.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PDO4You
Access SQL databases using the PDO extension
Author: By
Last change: Updated Pagination class
Date: 1 year ago
Size: 809 bytes


Class file image Download
// Loading demo class
require 'DemoRegister.php';

// Example with Read Records
echo '<h2><a href=".">DEMOS</a> &rsaquo; READING RECORDS</h2>';

// Creating an instance
$demo = new DemoRegister;

<div class="pdo4you">
    <form method="post">
        <h3><?php echo $demo::ADD_NEW_USER?></h3>

        <div><?php echo $demo::FIRST_NAME?>: <input type="text" name="firstname" /></div>
        <div><?php echo $demo::LAST_NAME?>: <input type="text" name="lastname" /></div>
        <div><?php echo $demo::MAIL?>: <input type="text" name="mail" /></div>
        <div><input type="submit" value="Register" /></div>

    <?php echo $demo->getMessage(); ?>

    <?php echo $demo::TOTAL_USERS?><?php echo $demo->getTotalOfRecords(); ?>

    <?php echo $demo->showRecords(); ?>