grab table row

From: Date: Wed, 05 Jul 2000 16:40:38 +0000
Subject: grab table row
Groups: php.general 
Request: Send a blank email to php-general+get-5002@lists.php.net to get a copy of this message
Hi, I am trying to get around using fishcart, or a JavaScript cart, which is more than I need. 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, and would prefer to stay away from JavaScript. I have had trouble with 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 (#5002) next »