Your SlideShare is downloading. ×
Karan chanan
Karan chanan
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Karan chanan

268

Published on

karan chanana tips of php search form

karan chanana tips of php search form

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
268
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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. 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>"; }?>

×