Location: PHPKode > projects > Decider > decider/Select_Quizes/gethint.php

<?php
//get the q parameter from URL
$q=$_GET["q"];//lookup all hints from array if length of q>0
require("../common/database.php");

$q_string="select distinct * from kid_qid leftouter join client_key_person where K_Id=Dkp_Id and Id like '".$q."%'";

$result=mysql_query($q_string,$link);

$q_ids;
 if (strlen($q) > 0)

 {
 $dataset="";
 //$dkpid=0;
 
 $i=0;
  while($row=mysql_fetch_array($result))
  {
   
      $q_ids[$i]=$row['Q_Id'];
      $dataset=$row['Q_Id'];
	  
	  //Akila edited
	  $kid=$row['K_Id']; 
	  
      $i++;
	  
//echo $dataset;

//-----------------------------------------------
//check boxes generating        
  }
  for($j=0;$j<count($q_ids);$j++){
  $q_string1="select Question from quiz where Id='".$q_ids[$j]."'";
  $ques_result=mysql_query($q_string1,$link);
  while($row1=mysql_fetch_array($ques_result)){
  $dataset=$row1['Question'];
  
 	echo '<input type="checkbox" id="'.$q_ids[$j].'" name="'.$q_ids[$j].'" ></input>'.$dataset."<br>";
 }
 }
}

?>

<html>
<body>

<input type="hidden" id="k_id" name="k_id" value="<?php echo $kid?>" >

</body>
</html>
Return current item: Decider