PHP Code:
<?php
$search = @$_GET['query'];
$db = mysql_connect('localhost', 'root', '');
mysql_select_db('site');
$do = "SELECT * FROM sites WHERE file_name LIKE '%\"$search\"%'";
$result = mysql_query($do);
while($files = mysql_fetch_array($result, MYSQL_ASSOC)){
echo "{$files['file_name']}";
}
echo "<H2>Search Script:</H2><br />";
echo "<FORM ACTION=\"search.php\" METHOD=\"GET\">";
echo "Please Enter Search Query<br />";
echo "<INPUT NAME=\"query\" TYPE=TEXT>";
echo "<br />";
echo "<INPUT TYPE= SUBMIT VALUE=\"Search\">";
echo "</FORM>";
?>
for some reason this isnt displaying any results to my browser any ideas ?
Comment