Web Programming >> PHP Programming
|
[목차] |
제24장 쇼핑몰 만들기 2
5. 구매자용 메뉴 수정
이 번에는 구매자 화면의 메뉴에서 제품 분류 출력기능을 수정합니다. 파일명 : menu.html <? session_start(); include "./user_function.html"; include "./dbconn.html";
?> <HTML> <HEAD> <TITLE> 관리자 - 메뉴 </TITLE> </HEAD> <style type="text/css"> <!-- a:link,a:visited,a:active { text-decoration : none; font-size: 10pt; } a:hover { text-decoration : underline; font-size: 10pt; color : red; } //--> </style>
<BODY BGCOLOR="#EEEEEE"> <br> <? if($user_id) { echo("<center><font size=2>$user_id 님께서<br>접속하였습니다.</font><br>"); ?> <A HREF="./logout.html" target="_top">접속종료</A><p></center> <?}else {?> <LI> <A HREF="./login.html" target="bookshop-main-detail">로그인</A><br> <LI> <A HREF="./register/registerform.html" target="bookshop-main-detail">회원가입</A><p> <?}?> <LI> <A HREF="./" target="_top">홈으로</A><p> <? $query = "SELECT DISTINCT part FROM product order by part";
$result= mysql_query($query); if (!$result) { error("QUERY_ERROR"); exit; }
$total_record = mysql_num_rows($result); for($i = 0; $i < $total_record; $i++) { $my_part = mysql_result($result,$i,0);
?> <LI> <A HREF="list.html?part=<?echo $my_part;?>" target="bookshop-main-detail"><?echo $my_part;?></A> <?}?> <p> <LI> <A HREF="list_bag.html" target="bookshop-main-detail">장바구니보기</A> </BODY> </HTML>
|
[목차] |