Liquid,
Just a few things before you try to code below. First, I hope you are using a real query and not just test? Secondly, unless you are really anal about the formatting of your code, drop all the \t's and \n's, it's only going to slow you down. Learn the hotkeys for find and replace. 😛 If you span the print function as I did in your while statement, it'll add the newlines AND spaces before the code to format it. Lastly, if that is the query you are using, it's probably returning nothing, hence the blank page.
This all said, here's the code:
<?php
$db = mysql_connect("", "", "");
if (!$db) {
echo "<p>Unable to connect to the server.</p>";
echo mysql_errno().": ".mysql_error()."<BR>";
exit();
}
if (!mysql_select_db("cyberspaceofframp")) {
echo "<p>Unable to find the database.</p>";
exit();
}
if (!mysql_query("test")) {
echo "<p>Unable to find the table.</p>";
exit();
}
print "<table>\n";
while ($line = mysql_fetch_object($result)) {
print "\t<tr>
\t\t<td>$line->some_field</td>
\t</tr>";
}
print "</table>\n";
?>
Forgot one more thing, a function like mysql_fetch_object will save you time in the long run. The object ($line) has properties that correspond to your field names in your database. So if you had the fields id, name, email, you could refer to them using $line->id, $line->name, $line->email. If you planned on echoing the field name as well I would use mysql_fetch_row().
Hope this all helps,
Tom
P.S. What do you mean by output your search in a hyperlink format? Like, make the text you output a link? Just add <A HREF></A> tags around the variable.