I think we are on the same page here. Let see if I can get more descriptive. You are correct about needing to have the mysql connect information, etc. You must have this somewhere in order to simply talk to the database. Once you have the communication working, then you will send the query to the db. If the db has what your looking for, then it will send it back, as shown below. If I were to make up an example, it would be this: "http://www.mycompany.com/showarticle.php?articleid=1922".
database:
id = int; // $array[0]
article = int; // $array[1]
image = varchar(50); // $array[2]
// note: the image is not actually the image
// although you can do it, most people
// just reference where that image is
// on the hard drive. Make sure you
// know the difference between
// virtual location and physical.
// The example below is using the virtual.
<?PHP
<table> // table def etc.
include("top.html");
include("left.html");
<?PHP
// db.inc.php
//
$host = "";
$dbname = "";
$dbadmin = "";
$dbpass = "";
$link = mysql_connect( $host, $dbadmin, $dbpass );
if ( ! $link )
{
$dberror = mysql_error();
print "$dberror<br>";
}
if ( ! mysql_select_db( $dbname, $link ) )
{
$dberror = mysql_error();
print "$dberror<br>";
}
$query = "SELECT * FROM articles WHERE articleid='$articleid'";
$result = mysql_query($query,$link);
print "<table>"
while ($array = mysql_fetch_array($result))
{
print "<tr>";
print "<td align=\"right\"><img src=\"$array[2]\">";
print "<td align=\"left\">$array[1]</td>";
print "</tr>"
}
print "</table>";
?>
Does this help?
I looked at the digitalmetal.com and it looks like yours. Stuff on the sides and article in the middle, and if I haven't lost track of what your doing, you'ld like to have the articles in a database, and reference them from another link.??!!
<a href="http://myserver.com/showarticle.php?articleid=1922">Ebony Tears</a>
As for your question about mysql handling html code, you've lost me. But, understand this. You can put html source into the database, and when you pull it out, you'll have the codes of what you want where you want. Or, if you just want to reference where your image is, and then create the html source in the static file, that will work also.
rathole is using the same way here. He has his site all set up with "includes", which makes it easier to update the site (as you know), and then for the specific article he uses a url variable called "id" to let his script know which article to pull from his database. So his script would say:
if ($id != "")
{
then pull from the db the article reference
by 2029.
}
John