Using session id's to grab data
<p>I've been working on a project for a few weeks where a user chooses a set of ingredients and it pulls out the recipes that have them ingredients in, but now I have a page that displays the recipes and I want the user to be able to click on a specific recipe and be directed to a page that displays that recipe and it's instructions.</p>

<p>Would I need to use a session id?</p>

<p>This displays the results and the buttons that must be pressed to get to the recipes instructions page.
<img src="http://i.stack.imgur.com/rYUIA.png" alt="enter image description here"></p>

<p>This is the page that you are directed to and it will display the recipe image, name, ingredients and instructions.</p>

<p><img src="http://i.stack.imgur.com/CF4Sk.png" alt="enter image description here"></p>

<pre><code>&lt;?php
if (isset($_POST['search'])) {
    $ingredient1 = mysql_real_escape_String ($_POST['dropdown1']);
    $ingredient2 = mysql_real_escape_String ($_POST['dropdown2']);
    $ingredient3 = mysql_real_escape_String ($_POST['dropdown3']);


    $recipes = mysql_query("
        SELECT DISTINCT `name`, `step1`, `step2`, `step3`, `image`, `reference`
        FROM `recipe` r
        INNER JOIN `recipe_ingredients` ri
        ON r.id = ri.recipe_id
        WHERE ri.ingredient_id IN (".$ingredient1.",".$ingredient2.",".$ingredient3.")
    ");

    while ($recipe = mysql_fetch_assoc($recipes)) {

        echo '&lt;section id="row"&gt;';
        echo '&lt;br /&gt;';
        echo $recipe['name'].'&lt;br /&gt;'; 
        echo '&lt;br /&gt;';
        echo "&lt;img src=\"{$recipe['image']}\" height=100 width=100 /&gt;&lt;br /&gt;";
        echo '&lt;form action="recipe.php"&gt;';
        echo '&lt;input id="search" name="Look" type="Submit" value="Look" &gt;';
        echo '&lt;/form&gt;';
        echo '&lt;br /&gt;';
        echo 'You will Need: ';
        echo '&lt;br /&gt;';
        echo '&lt;/section&gt;';

        //echo 'Step 1: ';
        //echo $recipe['step1'].'&lt;br /&gt;';
        //echo '&lt;br /&gt;';
        //echo 'Step 2: ';
        //echo $recipe['step2'].'&lt;br /&gt;';
        //echo '&lt;br /&gt;';
        //echo 'Step 3: ';
        //echo $recipe['step3'].'&lt;br /&gt;';
        //echo '&lt;br /&gt;';
        //echo '&lt;br /&gt;';
        //echo '&lt;a href="http://'.$recipe['reference'].'"&gt;'.$recipe['reference'].'&lt;/a&gt;';  
        //echo '&lt;/li&gt;';
        //echo '&lt;/ul&gt;';


    }
}


?&gt;
</code></pre>

<p>This is the php for grabbing the information from the database.</p>
