1 GP
程式(2)php~dreamweaver
作者:瑋│2007-12-04 12:11:32│巴幣:0│人氣:309
已經半個學期了.....今天是第三次上php(= = 汗)
排課好像出了點問題= =
不過還是感覺php比cpld輕鬆許多
做的也很生活化
像今天就做了商店拍賣程式
完成後感覺真好~
就像一個"遊戲網站"一樣~
(因為都co巴哈的資料上去的 = =)
程式碼:
conn.php:
<?
$host="localhost";
$user="root";
$pass="123456";
$database="store 6119";
$link=mysql_connect($host,$user,$pass);
?>
store.php:
<?php require_once('connections/Conn.php');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<title>無標題文件</title>
</head><body>
<? $db=mysql_select_db($database,$link);
$sql="select*from product";
mysql_query("SET NAMES 'big5'");
$result=mysql_query($sql,$link);
$row_Recordset1=mysql_fetch_assoc($result);
?>
<table border="1">
<tr>
<td>proid
<td>proname
<td>proprice
<td>protext
<td>propic
<? do { ?>
<tr>
<td><?php echo $row_Recordset1['proid'];?></td>
<td><?php echo $row_Recordset1['proname'];?></td>
<td><?php echo $row_Recordset1['proprice'];?></td>
<td><?php echo $row_Recordset1['protext'];?></td>
<td><img src="images/<?php echo $row_Recordset1['propic'];?>" /></td>
</tr>
<?php } while($row_Recordset1=mysql_fetch_assoc($result));?>
</table>
</body> </html>
引用網址:https://home.gamer.com.tw/TrackBack.php?sn=916755
All rights reserved. 版權所有,保留一切權利
相關創作
留言共 1 篇留言
KO:
<td><img src="imges/<?php echo $row_Recordset1['propic']; ?>" width="120" height="120" /></td>
12-11 11:18
我要留言提醒:您尚未登入,請先
登入再留言
1喜歡★jerryandhis 可決定是否刪除您的留言,請勿發表違反站規文字。
前一篇:幫巴哈想的一首打油詩~...
後一篇:96年11.12月統一發...