Forums
This topic is locked
Need Help
Posted 10 Jan 2006 01:43:51
1
has voted
10 Jan 2006 01:43:51 Rick Thunder posted:
I am useing DWMX/PHP/MySQL i have dynamic list/menu and and results page i can not get to work here is link www.simssurplus.com/simssurplus/
I did this on diffrent site and it works fine here is link www.simssurplus.com/chapman
Bin trying to fix this for a week now have no idea what the problum is Please Help
Here is the code for the 2 pages i am useing
<b>List/Menu Page</b>
<?php require_once('Connections/SimsSurplus.php'); ?>
<?php
mysql_select_db($database_SimsSurplus, $SimsSurplus);
$query_Recordset1 = "SELECT * FROM equipmentcatagory";
$Recordset1 = mysql_query($query_Recordset1, $SimsSurplus) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<html>
<head>
<title>Sims Surplus</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="results.php" name="Catagory" id="Catagory">
<div align="center">
<select name="CatagoryName" size="12" id="CatagoryName">
<?php
do {
?>
<option value="<?php echo $row_Recordset1['CatagoryName']?>"><?php echo $row_Recordset1['CatagoryName']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select>
<br>
<input type="submit" name="Submit" value="Submit">
</div>
</form>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
<b>Results Page</b>
<?php require_once('Connections/SimsSurplus.php'); ?>
<?php
$colname_Recordset1 = "-1";
if (isset($HTTP_GET_VARS['equipmentcatagory'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['equipmentcatagory'] : addslashes($HTTP_GET_VARS['equipmentcatagory']);
}
mysql_select_db($database_SimsSurplus, $SimsSurplus);
$query_Recordset1 = sprintf("SELECT * FROM equipmentlist WHERE Catagory = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $SimsSurplus) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<html>
<head>
<title>Sims Surplus</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="post" action="">
<table width="75%" border="1">
<tr>
<td><div align="center"><strong>QTY</strong></div></td>
<td><div align="center"><strong>Manufacture</strong></div></td>
<td><div align="center"><strong>Catagory</strong></div></td>
<td><div align="center"><strong>Catalog Number</strong></div></td>
<td><div align="center"><strong>Discription</strong></div></td>
<td><div align="center"><strong>Condition</strong></div></td>
<td><div align="center"><strong>Picture 1</strong></div></td>
<td><div align="center"><strong>Picture 2</strong></div></td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['QTY']; ?></td>
<td><?php echo $row_Recordset1['Manufacture']; ?></td>
<td><?php echo $row_Recordset1['Catagory']; ?></td>
<td><?php echo $row_Recordset1['CatalogNumber']; ?></td>
<td><?php echo $row_Recordset1['Discription']; ?></td>
<td><?php echo $row_Recordset1['Condition']; ?></td>
<td><img src="<?php echo $row_Recordset1['Picture1']; ?>" width="32" height="32"></td>
<td><img src="<?php echo $row_Recordset1['Picture2']; ?>" width="32" height="32"></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</form>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
Replies
Replied 10 Jan 2006 20:00:11
10 Jan 2006 20:00:11 Rick Thunder replied:
I fix my problum i set filter to table collum name it should have ben form name lol