PHP Classes

File: DBgrid.example.php

Recommend this page to a friend!
  Classes of Federico Larsen   DBgrid   DBgrid.example.php   Download  
File: DBgrid.example.php
Role: Example script
Content type: text/plain
Description: How to use this easy DBgrid
Class: DBgrid
Show the result of a mysql query on HTML table.
Author: By
Last change: Thanks to Erwin Bartsch feedback, i detected a parse error on the example.
Date: 21 years ago
Size: 781 bytes
 

Contents

Class file image Download
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
       <title>Title here!</title>
</head>
<body>
<?php
    
include("DBgrid.class.php");
    
mysql_pconnect("localhost","user","password");
    
mysql_select_db("dbasename");
    
$result=mysql_query("select * from table "); //only select statments
    
    
$tabla ='width="99%" border="1" cellspacing="0" cellpadding="0" bordercolor="#CCCCCC"';
    
$titulo ='bgcolor="#9999FF" class="titulotabla" height="20"><font color="#FFFFFF"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1"';
    
$linea = 'class="textochico"><font color="#999999"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1"';
    
$grid = new DBgrid($result,$tabla,$titulo,$linea);

?>
</body>
</html>