title: How to make search results open specific pages depending on search criteria
body: <p>This is a search function that pulls information depending on search criteria and prints it in a table. Also I have a few different pages for different restaurants that I want to open depending on what dish i click on. Basically, when I click on the href I want it to recognize which specific restaurant it is and take me there.</p>
  
  <p>This is my code:</p>
  
  <pre><code>&lt;%
          String value=request.getParameter("search");
          Class.forName("com.mysql.jdbc.Driver").newInstance();
          Connection conn = DriverManager.getConnection("**************", "******", "*******");
          Statement st=conn.createStatement();
          ResultSet rs = st.executeQuery("SELECT menu.name, menu.info, menu.price, restaurants.name from menu,"
                  + " restaurants where restaurants_restaurantID=RestaurantID AND (menu.name like '%"
                  + value
                  + "%' "
                  + "or menu.info like '%"
                  + value
                  + "%' or menu.category like '%"
                  + value
                  + "%' "
                  + "or menu.kitchen like '%"
                  + value
                  + "%' or quick_choose like '%" + value + "%')");
      %&gt;
          &lt;table&gt;
          &lt;tr class="head"&gt;
            &lt;td&gt;Name:&lt;/td&gt;
            &lt;td&gt;Info:&lt;/td&gt;
            &lt;td&gt;Price:&lt;/td&gt;
            &lt;td&gt;Restaurant:&lt;/td&gt;
            &lt;td&gt;Location:&lt;/td&gt;
           
          &lt;/tr&gt;    
        &lt;%
        
         while (rs.next()){ 
        %&gt;
          &lt;tr class="content"&gt;
            &lt;td class="name"&gt;&lt;%=rs.getString("name")%&gt;&lt;/td&gt;
            &lt;td class="info"&gt;&lt;%=rs.getString("info")%&gt;&lt;/td&gt;
            &lt;td class="price"&gt;&lt;%=rs.getInt("price")%&gt;&lt;/td&gt;
            &lt;td class="restaurant"&gt;&lt;%=rs.getString("restaurants.name")%&gt;&lt;/td&gt;
            &lt;td class="location"&gt;&lt;a href="#" %&gt;&gt;Show&lt;/a&gt;
            
          &lt;/tr&gt;
        &lt;%
         }
        %&gt;
        &lt;/table&gt;
  
      &lt;%conn.close();%&gt;
  
      &lt;/div&gt;
  </code></pre>