Location: PHPKode > scripts > Mod's Image Uploader > mods-image-uploader/searchp.php
<?
@include ('config.php');
$keywords = mysql_escape_string($_POST['search']);

echo "<center>";
$x = 0;
$con = mysql_connect($host,$user,$pass);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
echo "Images found matching the keyword $keywords (sorted from most to least recent): <br><br><br>";
mysql_select_db($db, $con);
$result = mysql_query("SELECT link FROM images WHERE keywords like '%$keywords%'  order by time desc");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$y = $x;
	if ($y == 1)
	{
		echo "<tr>";
	}
	if ($y == 5)
	{
		echo "<br><br></tr>";
	}
	if ($y == 10)
	{
		break;
	}
	$x++;

echo "<a href='$row[0]'><img width='100' height='100' src='" . $row[0] . "'></a>&nbsp";

     }
mysql_close($con);
echo "</center>";
?>

<html>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<center>
<font size="1">Copyright © 2008 MOD_CHAMPION & New Earth Programming Team</font>
</center>
</html>
Return current item: Mod's Image Uploader