PHP 게시판 리스트 샘플 소스
$db_host = "localhost";
$db_name = "ID";
$db_pss = "PASS";
$connect = mysql_connect($db_host, $db_name,$db_pss );
$result_0 = mysql_query($db_name, $connect);
echo $result_0."<br>";
mysql_select_db("DBNAME", $connect);
mysql_query("SET NAMES utf8");
$sql_4 = "select * from juso";
$result_4 = mysql_query($sql_4, $connect);
$fields = mysql_num_fields($result_4); //총 필드 갯수
echo "fileds = ".$fields."<br>";
if($v_num != null || $v_num == ""){
echo "<center>";
echo "<br>주소록 검색 결과.<br>";
echo "<table align='center' width='1024px'>
<tr>
<th align-'center'>선택</th>
<th align='center'>이름</th>
<th align='center'>주소</th>
<th align='center'>전화</th>
<th align='center'>비고</th>
<th align='center'>삭제</th>
</tr>";
echo "<tr>";
echo "<td colspan='6'><HR align='conter' width='1024px' ></td>";
echo "</tr>";
$ee=1;
while($row = mysql_fetch_row($result_4)){
echo "<tr>";
echo "<td align='center'>".$ee++."</td>";
echo"<td align='center'>".$row[$i]."</td>";
};
echo "<td align='center'>".$row[0]."</td>";//삭제버튼
echo "</tr>";
}
echo "</table>";