Location: PHPKode > projects > Decider > decider/Key_Person/selectedit.php
<?php
$user = "root";
 $pass = "123";
 $db = "deciderdb";
 $link = mysql_connect( "localhost", $user, $pass );
 if ( ! $link ) {
   die( "Couldn't connect to MySQL: ".mysql_error() ); }


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

mysql_select_db( $db, $link )
  or die ( "Couldn't open $db: ".mysql_error() );




if (isset($_GET['domain']) && $_GET['domain'] != '') {
	//Add slashes to any quotes to avoid SQL problems.
	$domain = addslashes($_GET['domain']);
	//Get every page title for the site.
	$result = mysql_query("SELECT * FROM key_person WHERE Domain_Name='".$domain."'");
	while($dkp = mysql_fetch_array($result)) {
		//Return each page title seperated by a newline.
		echo "<tr><td><input type='text' class='textbox2' id='".$dkp['Id']."' value='".$dkp['Name']."' ></td><td><input type='button' class='button1' value='Edit' onclick='javascript:edit_kp(".$dkp['Id'].");'></td></tr>";
		//echo "<option value='".$kp['Name']."'>".$kp['Name']."\n";
	}
}
?>
Return current item: Decider