Karan chanan


Published on

karan chanana tips of php search form

  • Be the first to comment

  • Be the first to like this

Karan chanan

  1. 1. <div class="searchbox"> <form action="Search.php" method="get"> <fieldset> <input id="$search" placeholder="Search for a Product" type="text" /> <input id="submit" type="hidden" /> </fieldset> </form></div><div id="content"><ul><?php$host = "xxx";$user = "xxx";$pass = "xxx";$db = "xxx";mysql_connect($host, $user, $pass);mysql_select_db($db);unset($host,$user,$pass,$db);//$query = "SELECT produkt FROM checklist WHERE id IS "1";$query = "SELECT produkt FROM checklist WHERE id LIKE %$search%";$result = mysql_query($query);
  2. 2. while ($row = mysql_fetch_array($result)){echo "<li><span class=name><b>$row[produkt]</b><br /></span><span class=comment><i>TierischeStoffe: </i>$row[tierisch]</span><i> Alkohol: </i>$row[alkohol]</span></span></li>"; }?>