I am trying to set up a form that will show catagories from the database. These catagories have a checkbox next to them with the number of sub_catagories. All information here has been brought into the form from the database. This part seems to work okay. The problem being is trying to send the information 'ticked' in the checkbox from the results_1.php into the 'results_1.php page.
Have been working on this for days and seem to be getting nowhere !!!!!!!!!!
Can anyone help me out with this code. below is the first part which works okay.
<?php require_once('Connections/Connection_1.php'); ?>
<?php
mysql_select_db($database_Connection_1, $Connection_1);
$query_rsCount = "SELECT catagory, count(*) as count FROM papers GROUP BY catagory ORDER BY catagory ASC";
$rsCount = mysql_query($query_rsCount, $Connection_1) or die(mysql_error());
$row_rsCount = mysql_fetch_assoc($rsCount);
$totalRows_rsCount = mysql_num_rows($rsCount);
?>
This is where I think ive got major problems.
<form action="results_1.php" method="get" name="search" id="search">
<table width="620" border="0" align="center">
<tr>
<td> </td>
</tr>
<tr>
<td><div align="center">
<?php do { ?>
<input <?php if (!(strcmp($row_rsCount['catagory'],"catagory"))) {echo "checked";} ?> type="checkbox" name="checkbox" value="catagory">
<span class="style1"><?php echo $row_rsCount['catagory']; ?></span> (<span class="style1"><?php echo $row_rsCount['count']; ?></span>)
<?php } while ($row_rsCount = mysql_fetch_assoc($rsCount)); ?>
</div></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
<div align="center"></div>
</form>
</body>
</html>
<?php
mysql_free_result($rsCount);
?>
Anyone who can help me out id be happy to make a donation to you via paypal if you have one or another method !!
Many thanks in advance
Mark