I have create my tables, and i have create the parser that takes the info from the form and sticks it in the mysql database. BUT the simplest thing (Displaying the data) is now working!! I have spent two hours looking and looking - I am about to pull my hair out.
Here is a link to the results of the below code:
http://www.trinitypa.com/GOVERNMENT/pending.htm
Here is the code, please tell me what stupid thing I am overlooking, because I will go bald here soon from pulling my hair out! LOL
The code in it's entirety:
<head>
<title>Display ACTS</title>
</head>
<body>
<?php
###########################################
Set Variables for Database Connection
###########################################
$Host = "mysql.best1-host.com";
$User = "xxxxxxxxxxxxxx";
$Password = "xxxxxxxxxxxxxx";
$DBName = "trinity";
$TableName = "title5";
#########################
Connect to Database
#########################
$Link = mysql_connect ($Host , $User, $Password);
############################################################################
Set up the Query from the Database and get everything out of the table.
############################################################################
$Query = "SELECT * from $TableName";
$Result = mysql_db_query ($DBName, $Query, $Link);
#############################################################
Now set up the HTML to display the results of the Query
#############################################################
print ("<TABLE BORDER = 0 CELLSPACING = 2 CELLPADDING = 2 ALIGN = CENTER>\n");
print ("<TR ALIGN = CENTER VALIGN = TOP>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Section</TD>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Status</TD>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Submitted By:</TD>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Heading</TD>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Sub Section 1</TD>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Sub Section 2</TD>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Sub Section 3</TD>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Sub Section 4</TD>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Sub Section 5</TD>\n");
print ("<TD ALIGN = CENTER VALIGN = TOP>Sub Section 6</TD>\n");
print ("</TR>\n");
######################################################
Loop through results until all fields are placed
######################################################
while ($Row = mysql_fetch_array($Result)) {
print ("<tr align = CENER Valign = top>\n");
print ("<td Align = center valign = top>$Row[section]</td>\n");
print ("<td Align = center valign = top>$Row[status]</td>\n");
print ("<td Align = center valign = top>$Row[submitted_by]</td>\n");
print ("<td Align = center valign = top>$Row[heading]</td>\n");
print ("<td Align = center valign = top>$Row[sub1]</td>\n");
print ("<td Align = center valign = top>$Row[sub2]</td>\n");
print ("<td Align = center valign = top>$Row[sub3]</td>\n");
print ("<td Align = center valign = top>$Row[sub4]</td>\n");
print ("<td Align = center valign = top>$Row[sub5]</td>\n");
print ("<td Align = center valign = top>$Row[sub6]</td>\n");
print ("</tr>\n");
}
###############################
Close Database Connection
###############################
mysql_close ($Link);
print ("</table>\n");
?>
</body>