Hi All,
Weather dull, raining again, England lost, WHATS NEW. Good luck to Portugal. That the good stuff out of the way, now for my problem.
I have a script with a form on it. The form is as below:
form action="category_search.php" method="get" name="category" target="_self" class="bodytext" id="category">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="57%" class="bodytext"><div align="right" class="producttitle">Select
</div></td>
<td width="16%"><div align="right">
<select name="category" class="bodytext" id="category">
<option value="LIM">Library and Information Management</option>
<option value="KM">Knowledge Management </option>
<option value="IP">Intellectual Property</option>
<option value="CON">Construction</option>
</select>
</div></td>
<td width="27%"><div align="right">
<input name="category" type="submit" class="formcolheadersmall" id="category" value="Category">
</div></td>
</tr>
</table>
</form>
When the submit button (Lable Name "Category") is click it should pickup the selection from the pulldown list and pass the variable to the next script.
When the submit button is clicked the URL in the browser shows:
[url]http://domain_name/catalogue/category_search.php?category=LIM&category=Category[/url]
NEXT SCRIPT.
<?php
$colname_category_search = "1";
if (isset($_POST['category'])) {
$colname_category_search = (get_magic_quotes_gpc()) ? $_POST['category'] : addslashes($_POST['category']);
}
mysql_select_db($database_Chandos, $Chandos);
$query_category_search = sprintf("SELECT * FROM chandos_books WHERE category = '%s'", $colname_category_search);
$category_search = mysql_query($query_category_search, $Chandos) or die(mysql_error());
$row_category_search = mysql_fetch_assoc($category_search);
$totalRows_category_search = mysql_num_rows($category_search);
?>
The result is NO DATA.
Can anyone see what is the problem. If you could I would be greatful.
Kind regards , keep safe and well.
Dereck