Location: PHPKode > projects > Decider > decider/Kp_Quiz/searchsugestquestion.php
 <?php
 
 require("../common/database.php");
 if ( ! $link ) {
   die( "Couldn't connect to MySQL: ".mysql_error() ); }

if (isset($_GET['search']) && $_GET['search'] != '') {
	//Add slashes to any quotes to avoid SQL problems.
	$search = addslashes($_GET['search']);
	//Get every page title for the site.
	$result = mysql_query("SELECT * FROM quiz WHERE Question like('" . 
		$search . "%')ORDER BY Question");

	while($suggest = mysql_fetch_array($result)) {
		//$i++;
		//$q="question".$i;
			
		echo  "\n" .$suggest['Question'] ;
	}
}

?>
Return current item: Decider