소스 파일명 : ajax_sub_display.php
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020

	include_once "config.php";

	echo "<meta http-equiv='content-type' content='text/html; charset=utf-8'>";

	$id = $_REQUEST['id'];

	$query = "select title,abbr from km where id=$id";
	$result = mysqli_query($dbi,$query);
		if (mysqli_errno($dbi)) { echo mysqli_errno($dbi)." : ".mysqli_error($dbi)."\n";}
	$matched = mysqli_fetch_assoc($result);
		echo "<strong>".$matched[title]."</strong><br>";
		echo $matched[abbr];
	

?>