創作內容

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月統一發...

追蹤私訊切換新版閱覽

作品資料夾

yvonne40528小說/新詩讀者
📢每週六晚上,小屋更新小說or新詩,歡迎追蹤訂閱、按讚留言!📚看更多我要大聲說昨天19:48


face基於日前微軟官方表示 Internet Explorer 不再支援新的網路標準,可能無法使用新的應用程式來呈現網站內容,在瀏覽器支援度及網站安全性的雙重考量下,為了讓巴友們有更好的使用體驗,巴哈姆特即將於 2019年9月2日 停止支援 Internet Explorer 瀏覽器的頁面呈現和功能。
屆時建議您使用下述瀏覽器來瀏覽巴哈姆特:
。Google Chrome(推薦)
。Mozilla Firefox
。Microsoft Edge(Windows10以上的作業系統版本才可使用)

face我們了解您不想看到廣告的心情⋯ 若您願意支持巴哈姆特永續經營,請將 gamer.com.tw 加入廣告阻擋工具的白名單中,謝謝 !【教學】