Login   Register  
PHP Classes
elePHPant
Icontem

File: ezSL/get_list.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of S. M. ARIFUL ISLAM  >  ezSL  >  ezSL/get_list.php  >  Download  
File: ezSL/get_list.php
Role: Auxiliary script
Content type: text/plain
Description: List constructor
Class: ezSL
Suggest words to complete text inputs using AJAX
Author: By
Last change:
Date: 7 years ago
Size: 735 bytes
 

Contents

Class file image Download
<?php
    
require_once("dbConf.inc");
    
    
$str="";
    
$sql="SELECT ".$_GET['field']." FROM ".$_GET['table']." WHERE ".$_GET['field']." Like '".$_GET['key']."%' ORDER BY file_name ASC LIMIT 0, 10";
    
$result mysql_query($sql) or die(mysql_error());
    
    
$id=0;
    while(
$row=mysql_fetch_row($result))
    {    
$id++;
        
$str .= nl2br('<div style="color:#993366; padding:2px; float:left">&nbsp;&curren;&nbsp;</div><div id="key_div_'.$id.'" onmousedown="HideElements(true, this.innerHTML)" onmousemove="SetStyle(this.id, true)" onmouseout="SetStyle(this.id, false)" style=" padding:2px; width:100%; cursor:pointer;">'.$row[0].'</div>');
    }
    
    echo 
$str.'<input type="hidden" id="NumRec" value="'.mysql_num_rows($result).'" />';
    exit();
?>