Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of milootooloo  >  Simple Abstract Table  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Exemple
Class: Simple Abstract Table
Store and retrieve objects from MySQL tables
Author: By
Last change:
Date: 2008-11-22 12:26
Size: 375 bytes
 

Contents

Class file image Download
<?php
// This page print the content and title of all rows of the news table
require_once "news.table.class.php";

echo 
"<html><head></head><body>";
echo 
"<a href=\"addnews.php\">Add news</a>";
$news=new news();
$news->load_all();
while(
$news->has_next()){
    echo 
$news->get_content()."<br>";
    echo 
$news->get_title()."<br><hr>";
    
$news->next();
}
echo 
"</body>";