日期:2014-05-17 浏览次数:20499 次
<!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=utf-8" />
<title>Window I</title>
</head>
<body>
<form id="inquery" method ="post" action="window2.php" >
<h2>Window I</h2>
<table >
<tr>
<td colspan="3"><b>General Information</b></td>
</tr>
<tr>
<td width="144"> </td>
</tr>
<tr>
<td><p>Item Name:</p></td>
<td>
<?php
include("include/connect.php");
//query string to ask the database
$sqlString = "SELECT item_name FROM $table_name1";
// ask the query from the database
$result = @mysql_query($sqlString,$connection) or die("Error: 003. Couldn't connect to table - Please try later");
?>
<select name="item_name" value ="<?php echo $item_name; ?>">
<option>--- Please Select ---</option>
<?php while($row = @mysql_fetch_array($result))
{ ?>
<option><?php echo $row['item_name'] ?></option>
<?php } ?>
<?php
echo "\$itemname = $itemname<br><br>";?>
</select>
</td>
</tr>
<tr>
<td width="144"> </td>
</tr>
</table>
<table>
<tr>
<td><input id="submit" class="submit" name="submit" type="submit" value="Inquery"/></td>
</tr>
</table>
</form>
</body>
</html>