Login   Register  
PHP Classes
elePHPant
Icontem

File: demodisplay.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Vick  >  PHP Search  >  demodisplay.php  >  Download  
File: demodisplay.php
Role: Example script
Content type: text/plain
Description: disp.
Class: PHP Search
Search for data MySQL tables and show the results
Author: By
Last change:
Date: 2005-05-28 07:07
Size: 634 bytes
 

Contents

Class file image Download
Basic example of the record display file<br>
you need to custumise this<br><br>
<center><table border=0>
<?
require_once ("config.inc");

    
$H="";
    if(isset(
$_GET["id"]))
        
$id=$_GET["id"];
    if(isset(
$_GET["table"]))
        
$table=$_GET["table"];
    if(isset(
$_GET["pk"]))
        
$pk=$_GET["pk"];
    
$db mysql_connect($SERVERNAME$USERNAME$PASSWORD);
    
mysql_select_db($DATABASENAME,$db)or die(mysql_error());
    
$sql="Select * FROM $table WHERE $pk = '$id' ";
    
$result=mysql_query($sql$db)or die(mysql_error());
    while(
$ligne mysql_fetch_array($result)){
        
$H.="<tr><td>".$ligne[1]."</td></tr>";
        
//...
        
}
    echo 
$H;
?>