Thanks. Someone wrote the code for me, so I didn't realize that the $Row[var] referenced an array.
This has me in a quandry because I am not using arrays in my form at all (if I even understan arrays correctly!).
If I understand correctly, an array is when there is a choice from several items for one field, i.e., for the field Favorite Fruit you have a choice of apple, banana, kiwi, tomato. The apple, banana, kiwi and tomato being part of the array.
If my understanding is correct, then I don't know why I even have the $Row[ ] in the code at all, since I have no fields like that.
This is the code for the output page. No data shows up if I remove the $Row[ ].
Thanks for your help!
<?php
// Fetch the results from the database.
{
$sql = "select *, DATE_FORMAT(date, '%m-%d-%Y') AS date_format FROM news where news_id = '$news_id' ORDER by date DESC";
echo mysql_error();
$result = mysql_query($sql);
$Row = mysql_fetch_array($result);
echo mysql_error();
print ("<font face=\"Arial, Helvetica, sans-serif\">\n");
print ("<TABLE BORDER=0 WIDTH=\"100%\" CELLSPACING=1 CELLPADDING=2 ALIGN=CENTER>\n");
print ("<TR ALIGN=LEFT VALIGN=TOP>\n");
print ("<TD ALIGN=LEFT VALIGN=TOP><font face=\"Arial, Helvetica, sans-serif\" size=4><b>$Row[heading]</b></font></TD>\n");
print ("</TR>\n");
print ("<TR ALIGN=LEFT VALIGN=TOP>\n");
print ("<TD ALIGN=LEFT VALIGN=TOP><font face=\"Arial, Helvetica, sans-serif\" size=2><b>By: <a href=\"mailto:$Row[author_email]\">$Row[author_name]</a></b></font></TD>\n");
print ("</TR>\n");
print ("<TR ALIGN=LEFT VALIGN=TOP>\n");
print ("<TD ALIGN=LEFT VALIGN=TOP><font face=\"Arial, Helvetica, sans-serif\" size=2><b>$Row[date_format]</b></font><p></TD>\n");
print ("</TR>\n");
print ("<TR ALIGN=LEFT VALIGN=TOP>\n");
print ("<TD ALIGN=left VALIGN=TOP>\n");
print ("<TABLE BORDER=1 WIDTH=\"200\" CELLSPACING=0 CELLPADDING=0 ALIGN=right>\n");
print ("<TR ALIGN=LEFT VALIGN=TOP>\n");
print ("<TD ALIGN=LEFT VALIGN=TOP> <font face=\"Arial, Helvetica, sans-serif\" size=1><a href=\"http://www.coloradosenate.com/colorado.php?news_id=$news_id\"target=\"_blank\">Click here to print this article</a></font><br>\n");
print ("<font face=\"Arial, Helvetica, sans-serif\" size=1><a href=\"../emailafriend2.php3?heading=$Row[heading]&author=$Row[author_name]\" target=\"_blank\">Click here to refer this page to a friend </a></font></center>\n");
print ("<font face=\"Arial, Helvetica, sans-serif\" size=1><a href=\"mainlist4.php3?senator_search=$Row[author_name]\">More from this Author</a></font></TD>\n");
print ("</TR>\n");
print ("</TABLE>\n");
print ("<font face=\"Arial, Helvetica, sans-serif\" size=2>$Row[body]</font>\n");
print ("</TD>\n");
print ("</TR>\n");
}
mysql_close ($Link);
print ("</TABLE>\n");
?>