Previous Thread
Next Thread
Print Thread
Rate Thread
#213577 02/11/2002 4:24 PM
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
ok here is what I'm doing bbut only got so far
I made an addon for the pals index page
what it's doing to grabbing some links from mylinks database!
now I have the connection string & even the select string
but it's not printing out in the table I'm sure I did not do the display the links code right in php... here it is :

<br>
<?
require ("/home/pathhere/pals/aconfig.inc.php");

"SELECT link FROM links WHERE cat=15 ORDER BY link ASC LIMIT 0, 30 ";

"link=$link";
$html = new html;

$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>";
echo "<TR><TD><a href='$link'></a></TD></TR>";
echo "</TABLE>";

$html -> close_table();

?>

now what did I not finish in order for them to display ?
I'm only learning php so go easy on me

ok this is the way I have it now but no juice
my connection string looks like this :
$dbh=mysql_connect ("localhost", "username", "pass") or die ('some thing went belly up I cannot connect to the database.');
mysql_select_db ("db-name");

Sponsored Links
interforos #213578 02/11/2002 8:28 PM
Joined: Oct 2000
Posts: 60
Power User
Power User
Offline
Joined: Oct 2000
Posts: 60
Change
echo "<TR><TD><a href='$link'></a></TD></TR>";
to
echo "<TR><TD><a href='$link'>$link</a></TD></TR>";
and see if you get anything.

Bommer #213579 02/11/2002 8:36 PM
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
nope :-(

interforos #213580 02/13/2002 11: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 12:42 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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 133007
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 11
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)
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 20260108)