-Combining the content of three data fields into one field in my resulting table.
Don't get this one, you appear to be outputting the two fields as individual table cells, isn't that what you want? Just put them both in one cell (?)
echo "<td>" . $row['Directory_Listing_Name_Year'] . ' ' . $row['Directory_Listing_03'] . "</td>";
-Have the first two fields reside on the first line, and the third field starting on the second line
I don't see a third, but it would be something like this (with one echo)
while($row = mysql_fetch_array($result)) {
echo "
<tr><td>" . $row['Directory_Listing_Name_Year'] . '</td><td>' . $row['Directory_Listing_03'] . "</td></tr>
<tr><td colspan=\"2\">" . $row['the-third-field'] . "</td></tr>
";
}
Note two rows (tr's) and that your columns muse add up: the second two must have a colspan of two to match the first.
-Stylize the text and color on the first two fields
-Stylize the table to be dotted apposed to solid.
Both of these are CSS questions. There is no dotted "command." This is further complicated by the fact that a border on a table only applies to the outside of the table when styled with CSS (It's not the same as the border attribute.) If you want borders in the cells you must style them so. But something that will get you started, add this to your CSS file.
#my-table { border: 1px dotted #808080; }
.first-row { background:#ebebeb; color: #000080; } /* dark blue on a light gray */
.second-row { background: #000; color: #fff; } /( white on black BG */
Include this somewhere between the <head> and </head> of your page output (template? Hard coded?) where "style.css" contains the previous.
<link rel="stylesheet" type="text/css" href="/path/to/style.css">
Then add the styles to your PHP
echo "<table id=\"my-table\">";
while($row = mysql_fetch_array($result)) {
echo "
<tr><td class=\"first-row\">" . $row['Directory_Listing_Name_Year'] . '</td><td>' . $row['Directory_Listing_03'] . "</td></tr>
<tr><td colspan=\"2\" class=\"second-row\">" . $row['the-third-field'] . "</td></tr>
";
}
echo "</table>";
(any on another note) how to accept photos into mySQL. That's not working.
You can store them as blobs directly in the DB, but a more traditional method, and less taxing on your database, is to upload them as plain old files somewhere and store only the
file name in the database. You'd store it like any other string, and output it like ordinary HTML . . .
echo "<img src=\"/path/to/" . $row['filename'] . "\" alt=\"" . $row['pagetitle'] . "\">";