Hi all,
I have a drop down reading from a table in the database.
When I select the option from the drop down i would require this information to be passed over to another page.
Can I use a link? If so is what I am doing correct?
Please see the code I'm using below...
drop down for category:
<p>Select an existing industry:<br />
<select name="categories">
<?php
$selectCategoryQuery = "SELECT * FROM categories ORDER BY categoryname";
$selectCategoryResult = mysql_query($selectCategoryQuery) or die(mysql_error());
while($row1Category=mysql_fetch_array($selectCategoryResult))
{ ?>
<?php echo '<option value="'.$row1Category['categoryid'].'">'.$row1Category['categoryname'].'</option>'; ?>
<?php }
?>
Then I was wondering how to pass the details to another page using a link??
<a href="addbrieftocategory.php?categoroyid=<?php echo $row['categoryid']?>" >
</a>
Which then takes me to another page where I can insert this id into a database table.
Can someone please advise me.
Thanks in advance