Location: PHPKode > projects > Decider > decider/Discussion/selectans.php
<?php


 require("../common/database.php");
 	if ( ! $link ) {
  		die( "Couldn't connect to MySQL: ".mysql_error() );
 	}

if (isset($_GET['kp']) && $_GET['kp'] != '') {

	//Add slashes to any quotes to avoid SQL problems.
	$kp = addslashes($_GET['kp']);

	//aquiring data for fake key person id
	$my_query="select * from client_key_person where Id='".$kp."'";

	$my_result=mysql_query($my_query,$link);

	$raw=mysql_fetch_array($my_result);

	$k_p=$raw['Dkp_Id'];
	
	$i=1;
	
	$result = mysql_query("SELECT * FROM quiz,client_feedback WHERE Id=Quiz_Id AND Keyperson_Id='".$k_p."'");
	while($ckp = mysql_fetch_array($result)) {
		echo "<tr><td>Q .".$i."</td><td>".$ckp['Question']."</td></tr>";
		echo "<tr><td></td><td>&nbsp;&nbsp;&nbsp;A. ".$ckp['Answer']."</td></tr>";
		echo "<br />";
		$i++;
	}
	
	//storing values for further use

	//echo '<form action="forumtab.php" method="post" id="forum">';
	//echo '<input type="hidden" id="org" name="org" value="pissu" >';
	//echo '</form>';
}

?>
Return current item: Decider