I have a page menukaart_listing.php on which you arive after you have choosen a category from a dropdown list using post .
<form class="select_form" action="menukaart_listing.php" method="post">
<label>Menu Categorie:</label>
<select name="menu_id" class="selectfield">
<option value="">Select Categorie</option>
<?php
$categories = mysql_query("SELECT menu_kaart_id, menu_kaart_sequence, menu_kaart_type_nl
FROM menu_kaart
ORDER BY menu_kaart_sequence") or die(mysql_error());
while ($row = mysql_fetch_assoc($categories)) {
echo "<option value=\\"{$row['menu_kaart_id']}\\">{$row['menu_kaart_type_nl']}</option>";
}
?>
</select>
<p><input type="submit" name="submit" value="Submit" class="button" /></p>
</form>
After each menu item on the listing page I have an anchor called edit:
<a href="edit_menukaart_item.php?item_id={$row['menu_kaart_item_id']}">wijzig</a>
which as you can see brinks you to a edit page (edit_menukaart_item.php) After an edit/update is done and the form is submitted I would like to go back to the listing page showing the same category as before! So I added a hidden field to the edit/update form called menu_id:
<input type="hidden" name="menu_id" value="<?php echo $row->menu_kaart_id;?>" />
And I am using the following redirect:
header('Location: '.DIRADMIN.'menukaart_listing.php?menu_id='.$menu_id);
It redirects to menukaart_listing.php and it sends the query string as well as I can see in the url, but it doesn’t show me the listing. What am I doing wrong?
Thank you in advance