home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Master Visually: Macrome…a Dreamweaver 8 & Flash 8
/
MasterVisuallyDreamweaver8AndFlash8.iso
/
mac
/
Samples
/
ch16
/
flower_details.php
< prev
next >
Wrap
PHP Script
|
2005-12-28
|
2KB
|
62 lines
<?php require_once('Connections/cxn_flower.php'); ?><?php
$maxRows_DetailRS1 = 10;
$pageNum_DetailRS1 = 0;
if (isset($_GET['pageNum_DetailRS1'])) {
$pageNum_DetailRS1 = $_GET['pageNum_DetailRS1'];
}
$startRow_DetailRS1 = $pageNum_DetailRS1 * $maxRows_DetailRS1;
mysql_select_db($database_cxn_flower, $cxn_flower);
$recordID = $_GET['recordID'];
$query_DetailRS1 = "SELECT * FROM flower WHERE Item = $recordID ORDER BY Name ASC";
$query_limit_DetailRS1 = sprintf("%s LIMIT %d, %d", $query_DetailRS1, $startRow_DetailRS1, $maxRows_DetailRS1);
$DetailRS1 = mysql_query($query_limit_DetailRS1, $cxn_flower) or die(mysql_error());
$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);
if (isset($_GET['totalRows_DetailRS1'])) {
$totalRows_DetailRS1 = $_GET['totalRows_DetailRS1'];
} else {
$all_DetailRS1 = mysql_query($query_DetailRS1);
$totalRows_DetailRS1 = mysql_num_rows($all_DetailRS1);
}
$totalPages_DetailRS1 = ceil($totalRows_DetailRS1/$maxRows_DetailRS1)-1;
?><!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<table border="1" align="center">
<tr>
<td>Name</td>
<td><?php echo $row_DetailRS1['Name']; ?> </td>
</tr>
<tr>
<td>Item</td>
<td><?php echo $row_DetailRS1['Item']; ?> </td>
</tr>
<tr>
<td>Color</td>
<td><?php echo $row_DetailRS1['Color']; ?> </td>
</tr>
<tr>
<td>Price</td>
<td><?php echo $row_DetailRS1['Price']; ?> </td>
</tr>
<tr>
<td>Description</td>
<td><?php echo $row_DetailRS1['Description']; ?> </td>
</tr>
</table>
</body>
</html><?php
mysql_free_result($DetailRS1);
?>