 |
|
Code (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=windows-874" />
<title>movie::vcdแสดงผลข้อมูลข้อมูล</title>
<style type="text/css">
<!--
.style3 {
font-size: 18px;
color: #0000FF;
font-weight: bold;
}
.style4 {
font-size: 18px;
font-weight: bold;
color: #FF0000;
}
.style5 {
font-size: 36px;
font-weight: bold;
color: #FF0000;
}
.style7 {font-size: 14px; font-weight: bold; }
-->
</style>
</head>
<body>
<p class="style5">ระบบข้อมูลหนัง DVD </p>
<p class="style4">แสดงผลข้อมูลข้อมูล</p>
<p class="style3"><a href="list.php">แสดงข้อมูล</a> <a href="detall.php">ค้นหา</a><a href="update.php"></a> <a href="insert.php">เพิ่มข้อมูล</a></p>
<form id="form1" name="form1" method="post" action="">
<table width="760" border="1" align="left" cellpadding="2" cellspacing="0" bordercolor="#0066FF">
<tr bgcolor="#0066FF">
<td width="131" align="left" valign="top"><div align="center" class="style7"><font color="#FFFFFF" face="Tahoma, MS Sans Serif">รหัสภาพยนตร์</font></div></td>
<td width="187" align="left" valign="top"><div align="center" class="style7"><font color="#FFFFFF" face="Tahoma, MS Sans Serif">ชื่อเรื่อง </font></div></td>
<td width="145" align="left" valign="top"><div align="center" class="style7"><font color="#FFFFFF" face="Tahoma, MS Sans Serif">ประเภท</font></div></td>
<td width="52" align="left" valign="top"><div align="center" class="style7"><font color="#FFFFFF" face="Tahoma, MS Sans Serif">ราคา</font></div></td>
<td width="35" align="left" valign="top"><div align="center"><span class="style7"><font color="#FFFFFF" face="Tahoma, MS Sans Serif">จำนวนม้วน</font></span></div></td>
<td width="34" align="left" valign="top"><div align="center" class="style7"><font color="#FFFFFF" face="Tahoma, MS Sans Serif">รูปภาพ</font></div></td>
<td colspan="2" align="left" valign="top"><div align="center" class="style7"><font color="#FFFFFF" face="Tahoma, MS Sans Serif">ลบข้อมูล</font></div></td>
</tr>
<?php
$hostname = "localhost";
$username = "root";
$password = "";
$dbname = "movie";
$conn = mysql_connect( $hostname, $username, $password );
if ( ! $conn )
die ( "ไม่สามารถติดต่อกับ MySQL ได้" );
mysql_select_db ( $dbname, $conn )
or die ( "ไม่สามารถเลือกฐานข้อมูลได้" );
$sqltxt = "SELECT * FROM vcd";
$result = mysql_query ( $sqltxt, $conn );
while ( $movie = mysql_fetch_array ( $result ) )
{
$result = mysql_fetch_array($result);/// หาตัวแปรไม่เจอครับ
$movpic=$result[movpic];///หาตัวแปรไม่เจอครับ
?>
<tr>
<td height="24"><font size="2" face="Tahoma, MS Sans Serif"><?php echo $movie["movid"] ?></font></td>
<td><font size="2" face="Tahoma, MS Sans Serif"><?php echo $movie["movname"] ?></font></td>
<td><font size="2" face="Tahoma, MS Sans Serif"><?php echo $movie["movkind"] ?></font></td>
<td><font size="2" face="Tahoma, MS Sans Serif"><?php echo $movie["movprice"] ?></font></td>
<td><font size="2" face="Tahoma, MS Sans Serif"><?php echo $movie["movcoil"] ?></font></td>
<td><img src="picture/<?echo"$movpic";?>" target="_blank" width="100" height="100"></td>
<td width="75"><div align="center"><font size="2" face="Tahoma, MS Sans Serif"><a href="update.php?movid=<?php echo $movie['movid']; ?>">แก้ไข</a></font> </div></td>
<td width="31"><font size="2" face="Tahoma, MS Sans Serif"><a href="delete.php?movid=<?php echo $movie['movid']; ?>">ลบ</a></font></td>
</tr>
<?php
}
mysql_close ( $conn );
?>
</table>
</form>
<p class="style3"> </p>
</body>
</html>
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
2009-10-02 00:33:42 |
By :
somsak84 |
View :
985 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |