Page 321 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 321

$select  =  "select  *  from  usertable;";//db선택

             $query = mysql_query(  $select, $connect);
             ?>
             <style  type  =  "text/css">

                     table{
                             width:  100%;
                             border-collapse:  collapse;

                     }
                     th,  tr,  td{
                             border:  1px  solid  #bcbcbc;

                     }
             </style><!--표  선  그리기-->
             <table  width  ="400"  border  ="1">

                     <tr  align=center>
                     <th>  <font  size=5>  상품번호  </font></th>
                     <th>  <font  size=5>  이름  </font></th>

                     <th>   <font  size=5>  가격  </font></th>
                     </tr>
             <?php

             while  ($row  =  mysql_fetch_array($query))//mysql  필드값  읽어와서  배열로  출력하기
             {
                     echo"

                     <tr>
                                     <th>$row[code]</th>
                                     <th>$row[name]</th>

                                     <th>$row[price]</th>
                     </tr>
                     ";

             }
             mysql_close();
             ?>

             </table>





















                                                         -  314  -
   316   317   318   319   320   321   322   323   324   325   326