Location: PHPKode > projects > MtxEventManager > MtxEventManager-V2-beta1-source-italian/mtxeventmanager/requestScript.php
<?php

/**
 * @Author				Tarchini Maurizio
 * @Version				1.0
 * @AuthorEmail			hide@address.com or hide@address.com
 * @AuthorSite			http://www.mtxweb.ch
 * @DocumentDate		7-3-2008
 * @DocumentLicense		PUBLIC -FREE
 * @LicenseDetail		GNU General Public License
 * @LicenseSite			http://www.gnu.org/licenses/gpl.txt
 * @PHPCompatibility	4.2 or later
 * @DevelopmentStatus	DIST - beta
 */


$findme = $_POST['key']; 
$list = '<ul>'; 

include_once "./lib/function_db.php";

global $con; //si suppone che siamo connessi al db 
$sql = "SELECT titolo FROM events WHERE titolo LIKE '%$findme%'"; 
$result = GetRes($sql); 
if (mysql_num_rows($result) > 0)
	{ 
   		$first = 0;	
		while($row = mysql_fetch_array($result))
		{ 
   			
			if ($first == 0)
			{
				$list .= "<li class=\"first\">Suggerimenti trovati: " . mysql_num_rows($result) . "</li>";
				$first = 1;
			}
			$list .= '<li onmouseover="this.className=\'yellowThing\';" onmouseout="this.className=\'whiteThing\';">' . $row['titolo'] . '</li>'; 
		} 
	} 


$list .= '</ul>';
mysql_free_result($result); 

echo $list; 
unset($list); 


?>
Return current item: MtxEventManager