-
Searching Script
Hey.
I need a searching script, for websites, so people can search for what they need.
I remember that you could do something like this with frontpage, but I don't have FrontPage anymore.
So, can anyone tell me where I can get a script like this?
Thanks, +rep!
-
-
Won't it say like:
( WHATEVER HERE ) [box]
Search on google () Search on YOURSITE.com ()
-
Ignore what front page tells you, its code is extremly tacky. If your site it based arround a mysql database you could simply use the wild card to make a search. Someone would search for "hi" and you could use SELECT * FROM tablename WHERE description = '%hi%' or something like that.
-
-
The HotScripts thingy doesn't work.
-
PHP Code:
<?php
$search = $_GET ["search"];
$sql = mysql_query ( "SELECT * FROM `objects` WHERE `title` LIKE '%$search%' OR `description` LIKE '%$search%'" );
while ( $fetch = mysql_fetch_array ( $sql ) ) {
echo ("<a href=\"view.php?id={$fetch["id"]}\">{$fetch["title"]}</a><br>
<i>{$fetch["description"]}</i>");
}
?>
That should work ;)
-
Too bad I don't know anything about PHP and MySQL :(
I've found a script now, will try it later.