im not sure if this will help as im only new to this myself, but im willing to give it a shot
<?
$query = ("SELECT * FROM tbl WHERE name LIKE '%$search%'");
$result = MYSQL_QUERY($query);
if (!$result) print ("failed\n");
WHILE ($row=MYSQL_FETCH_ROW($result))
//count the rows
$number = mysql_numrows($result);
if (!$number) print("failed 2 \n");
$i = 0;
//echo rows
echo "There are $number entries found";
WHILE ($i < $number):
$id = mysql_result($result, $i,id);
if ($i%2 == 0) {
//make the table
echo "<p> .: Search :. </p>";
echo "<hr><table>";
echo " <tr>";
echo " <td><a href='show.php?$id'>$search</a></td>";
echo " </tr>";
echo "</table>";
} else {
echo "<p> .: Search :. </p>";
echo "<hr><table>";
echo " <tr>";
echo " <td><a href='show.php?$id'>$search</a></td>";
echo " </tr>";
echo "</table>";
}
$i++;
ENDWHILE;
echo "here";
?>
//make the form
<form action=search.php method=post>
Search: <input type=text name=search>
<input type=submit name=submit value=Submit>
</form>
//end the query
<? } ?>
then insert each entry into the db, with a table containg
id, name
then create a page named like show.php
//determine if in the url it contains an id exp. show.php?id=1
<? if ($id) {
$query = ("SELECT * FROM tbl WHERE id='$id'");
$result = MYSQL_QUERY("$query");
//shows if it failed to get results
if (!$result) echo ("failed\n");
WHILE ($row=MYSQL_FETCH_ROW($result))
//gets the number of results
$number = mysql_numrows($result);
if (!$number) echo('');
$i = 0;
//if the number is bigger then 0 it defines the objects
WHILE ($i < $number):
//you can add as many as you like, as long as they are rows in the database
$name = mysql_result($result, $i,name);
$id = mysql_result($result, $i,id);
if ($i%2 == 0) {
//echo the table
echo "<hr><table>";
echo "<tr><td><font size='3'>$name</font>";
echo "</tr>";
echo "</table>";
} else {
echo "<hr><table>";
echo "<tr><td><font size='3'>$name</font>";
echo "</tr>";
echo "</table>";
}
$i++;
ENDWHILE;
} else {
//echo the error
echo "You have incorrectly reached this page";
}
?>
that will show ya it according to the id defined in the url exp. show.php?id=536
i really hope that helps, if not, im sorry for wasting your time 🙂