pieteral Posted August 30, 2012 Share Posted August 30, 2012 (edited) Hi I need code for a search bar for my site, which will search words on my site. Can someone help me with that. Thank you Pieter Edited September 3, 2012 by pieteral Link to comment Share on other sites More sharing options...
worrall Posted September 7, 2012 Share Posted September 7, 2012 (edited) This is the code i use to search the data.$query=mysql_query("select * from inser where name='".$_GET['id']."'"); // Query to fetch data from data base$row=mysql_fetch_array($query); // Query to fetch data from data base//code for search $output="<table border='2' cellpadding='4' align='center'><tr><th>name</th><th>email</th><th>dob</th><th>phone</th><th>city</th></tr>";$output.="<?php while($row = mysql_fetch_array($row)) { ?><tr><td>".$row['name']."</td><td>".$row['email']."</td><td>".$row['dob']."</td><td>".$row['phone']."</td><td>".$row['city']."</td></tr>";$output.="</table>";echo $output; Edited September 7, 2012 by worrall Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now