Código PHP:
<?
$cnx = mysql_connect("localhost","root","");
mysql_select_db("DB");
if (!$cnx)
echo mysql_error();
else
$busca="%".$_POST['link']."%";
$sql = mysql_query("SELECT * FROM site_coches WHERE link LIKE '$busca' ORDER BY id DESC");
while($row=mysql_fetch_array($sql)){
echo"<table width='320' border='0' cellspacing='1' cellpadding='0'>
<tr bgcolor='#FFFF99'>
<td width='62%' height='17'><div align='left'><strong> Referencia: </strong>".$row['link']."</div></td>
<td width='38%'><div align='left'><strong> ID: </strong>".$row['id']."</div></td>
</tr>
</table>";
}
mysql_close($cnx);
?>
