ok I got it but my tables are messed up maybe you can help me here
<br>
<?
//database connection
@ $db=mysql_connect("localhost","bd_name","password");
//error if can't connect
if (!$db)
{
echo "Error: Something spit up we Could not connect to the database. Please tell Doorslammer he messed up.";
exit;
}
//lets select the database
mysql_select_db("digitalb_mylinks");
// $result = mysql_query("SELECT * FROM links");
// $number_of_links = mysql_num_rows($result);
// echo "<p>Number of link found: $number_of_links</p>";
// mysql_free_result($result);
$html -> open_table();
echo "<TR><TD ALIGN=Center VALIGN=TOP CLASS="tdheader">Our $affi Affiliates</TD></TR><TR><TD ALIGN=LEFT VALIGN=TOP CLASS="lighttable"><TABLE>";
$result = mysql_query("SELECT * FROM links WHERE cat=16 ORDER BY link");
if ($result) {
while ($row = mysql_fetch_array($result)) {
$title = $row["title"];
$link = $row["link"];
// print my query
echo "<TR><TD><a href='$link'>$title</a><br>";
}
}
echo "</TD></TR></TABLE>";
$html -> close_table();
?>
btw this is an addon I made for daves index so I could display some links from the mythreads ? links script
hehe code fixxed all don working great
if anyone wants this let me know (the above code is correct now
Last edited by Dslam; 02/13/2002 12:42 PM.