Hi,
As I understand it, in order for what I want to happen, I need to print the ID in the link and not the title.
First Table - Recipes:
Columns are:
recipe_id (Set as Primary Key, Auto Increment)
title
ingredients
prep
serves
Second Table - Categories:
Columns/values are:
category_id (Values: 1, 2, 3, 4, 5, 6, 7)
category_name (Values: Desserts, Drinks, Fowl, Meat, Pasta, Seafood, Vegetables)
Here’s the scenario:
Jennifer enters the following Recipe into a form on the Desserts Page:
Title: Apple Strudel
Ingredients: Apples, Flour, Water
Prep: Core and slice apples, etc.
Serves: 6
Category: 1
Mary enters the following Recipe into the same form:
Title: Blueberry Pie
Ingredients: Blueberries, Flour, Water
Prep: Wash blueberries, etc.
Serves: 6
Category: 1
The title of each recipe now appears above the form on the Desserts Page, which is what I want.
Linda decides she wants to view each of the recipes, and goes to the Desserts Page. She clicks on Apple Strudel, and the page that’s created shows that recipe. However, when she clicks on “Blueberry Pie,” while the ending of the URL address is recipesdesserts.php?recipeID=1Blueberry (recipesdesserts.php is the display page), the actual page that’s created shows the recipe for the Strudel.
I’ve tried adding some code to Print the Id in the Link and not the Title, but have not had any luck. This is the code that creates the Link from the Title that’s entered:
<?php do { ?><li><a href=“…/Recipes/recipesdesserts.php?recipeID=1<?php echo $row_GetRecipes[‘Title’]; ?>”><strong><?php echo $row_GetRecipes[‘Title’]; ?></strong></a></li><?php } while ($row_GetRecipes =
mysql_fetch_assoc($GetRecipes)); ?>
Could someone please take a look at it, and show me the code additions/corrections that need to be made?
Thank you!