grab table row -readme.1st

From: Date: Wed, 05 Jul 2000 17:20:37 +0000
Subject: grab table row -readme.1st
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5009@lists.php.net to get a copy of this message
I realize I should build the array and then print my table from it rather than trying to grab from a parsed table, but it is not clear to me how, and the link that references the index gives me great fear :/ Essentially, I want to grab a row and create a hyperlink on the fly. This last column's link should be bring up a new page with the full record details. I am using mysql/php3. I have had trouble with building the array (a loop within a loop?) and this sprinkling a link into a table utilizing that row) I have lurked, and scoured and can find nothing. Thanks in advance! My code is as follows // create header row print("<TR>\n"); print("<TD BGCOLOR=\"#CCCCCC\"><B>Chicken breed</B></TD>\n"); print("<TD BGCOLOR=\"#CCCCCC\"><B>Weight</B></TD>\n"); print("<TD BGCOLOR=\"#CCCCCC\"><B>Colour</B></TD>\n"); print("</TR>"); //start data printing to table format if ($row = mysql_fetch_array($query)) { do { print ("<TR>"); // start row print("<TD> <FONT SIZE=\"-4\">\n"); print $row["CHICKEN"]; print ("</TD>"); print("<TD> <FONT SIZE=\"-4\">\n"); print $row["WEIGHT"]; print ("</TD>"); print("<TD> <FONT SIZE=\"-4\">\n"); print $row["COLOUR"]; print ("</TD>"); print ("</TR>"); // end row } while ($row = mysql_fetch_array($query)); } else {print "Sorry, no records were found!";} print ("</TABLE>"); //end table

« previous php.general (#5009) next »