$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>";
'공부거리 > PHP' 카테고리의 다른 글
PHP 문자열 함수 (0) | 2013.05.29 |
---|---|
[PHP] $_SERVER[] 값 (0) | 2013.04.04 |
php,jsp,asp 이전 페이지 URL 얻어오기 (0) | 2012.06.14 |
이클립스+php셋팅 (0) | 2012.05.11 |
PHP3 문법 기초 (0) | 2011.10.12 |