Previous Thread
Next Thread
Print Thread
Rate Thread
interforos #213580 02/13/2002 10:37 AM
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
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 11:42 AM.
Sponsored Links
Entire Thread
Subject Posted By Posted
help LOl Dslam 02/11/2002 11:24 PM
Re: help LOl powerlord 02/12/2002 3:28 AM
Re: help LOl Dslam 02/12/2002 3:36 AM
Re: help LOL Dslam 02/13/2002 6:37 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 34299
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 1
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
isaac 2
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)