Thank you for the fast reply, indeed this is a tutorial showing a search engine, but it seemns quite complicated for me to blend it into my page (i have read it b4), i have a found an 'easier' version of a search engine here http://www.spoono.com/php/tutorials/tutorial.php?id=12 but although this includes less code im having trouble inserting it into my page, and mainly having the page display all the items at first and the searched ones after a search is done.
Am I supposed to enter an if loop containing the html which displays the fields, corresponding to the $search or sometihng like that?
here is my updated code
<html>
<TITLE>Data List Page</TITLE>
<body>
<?php
$username="XXXXX";
$password="XXXXX";
$database="XXXXX";
$search=@$_GET['word'] ;
mysql_connect('192.168.0.1',$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM filez
ORDER BY name ASC";
$result=mysql_query($query);
$resultsearch=mysql_query("SELECT * FROM filez WHERE name LIKE '%$search%' ORDER BY name ASC");
$num=mysql_numrows($result);
mysql_close();
?>
<table width="835" border="1" align="center">
<tr>
<th width="311"><font face="Arial, Helvetica, sans-serif">Name</font></th>
<th width="417"><font face="Arial, Helvetica, sans-serif">File</font></th>
<th width="85"><font face="Arial, Helvetica, sans-serif">Download</font></th>
</tr>
</table>
<form action="search.php" method="gett">
<table width="835" border="0" align="center">
<tr bgcolor="#FFFFFF">
<td width="146" ><input type="text" name="word" /></td>
<td width="679"><input type="submit" name="submit" value="Search" /></td>
</tr>
</table>
</form>
<?php
$i=0;
while ($i < $num) {
$f1=mysql_result($result,$i,"name");
$f2=mysql_result($result,$i,"file");
$f3=mysql_result($resultsearch,$i,"name");
$f4=mysql_result($resultsearch,$i,"file");
?>
<table width="835" border="0" align="center">
<tr bgcolor="#66FFFF">
<td width="311"><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td>
<td width="417"><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td>
<td width="85"><font face="Arial, Helvetica, sans-serif"><a href="http://www.inducedvision.com/XXXX/<?php echo $f2; ?>" title="DOWNLOAD FILE" target="_self">Link</a></font></td>
</tr>
</table>
<?php
$i++;
}
?>
</body>
</html>