Untitled
By: a guest | Mar 22nd, 2010 | Syntax:
PHP | Size: 1.79 KB | Hits: 32 | Expires: Never
<?php
$link = mysql_connect('localhost', 'yui', 'iyu');
$lacz = mysql_select_db ( 'dfg' );
$limit = 10;
echo "
<title> CFGFactory.com - Commands Dictionary </title>
<style type='text/css'>
html, body {
font-family: Tahoma, sans-serif, arial, helvetica;
decoration: none;
}
</style>
<center>
<br><br><br><a href='search.php'><img src='http://hubex.cfgfactory.pl/cmd.png' border='0'></a>
<a href='search.php'></a><br><br><br>
<form action='".$_SERVER[PHP_SELF]."' method='post'>
<input type='text' name='fraza' size='32'>
<br><br><input type='image' src='bttn.jpg' />
</form>";
if($_POST){
$query = "SELECT name,opis,sample FROM cmd WHERE name='".$_POST['fraza']."' OR opis LIKE '%".$_POST['fraza']."%'";
$result = mysql_query($query);
if(mysql_num_rows($result) < $limit){
echo '<br><br><table border="1" width="950" height="86" cellspacing="0" cellpadding="0" bordercolor="#00000" bordercolorlight="#00000" bordercolordark="#00000">
<tr>
<td height="35" width="244" align="center" valign="middle"><b>Name</b></td>
<td height="35" width="408" align="center" valign="middle"><b>Description</b></td>
<td height="35" width="316" align="center" valign="middle"><b>Sample</b></td>
</tr>';
while($rec = mysql_fetch_assoc($result)){
echo '
<tr>
<td height="0" width="244" align="center" valign="middle">'.$rec['name'].'</td>
<td height="0" width="408" align="center" valign="middle">'.$rec['opis'].'</td>
<td height="0" width="316" align="center" valign="middle">'.$rec['sample'].'</td>
</tr>';
}
echo '</center></table>';
}else{
echo '<br><br>Search engine found too much commands. Precisely your search phrase.';
}
}
?>