Re: Table format needs php correction

From: Date: Sat, 30 Aug 2003 18:06:52 +0000
Subject: Re: Table format needs php correction
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-161261@lists.php.net to get a copy of this message
* Thus wrote Gloria L. McMillan (glomc@DakotaCom.net): > Hi! Hello Gloria, > > This is a problem of the table formatting on a form in MySQL and PHP. > It may be in the HTML table code. > ... > Here is the URL to view PHP HTML table as it appears on screen: > http://DakotaCom.net/~glomc/forms/CAT.php I think you need to take a step back for a moment. First consider how you want the data to be presented in html, then the php code will be very simple. From what I see and how I would prefer to set the layout would be something like this: Date Name Course Unit Aug 30 2003 Gloria WRT 102 Fall 03 Essay 1 Q1 data for q1 Q2 data for q2 ... Then easily put that into a html table structure: <tr> <td>Date</td><td>Name</td><td>Course</td><td>Unit</td> </tr> <tr> <td>Aug 30 2003</td><td>Gloria </td><td>WRT 102 Fall 03</td><td>Essay 1</td> </tr> <tr> <td>Q1</td><td colspan="3">data for q1</td> </tr> <tr> <td>Q2</td><td colspan="3">data for q2</td> <tr> ... Now inside your fetch_array loop just use that template above using php variables instead of text and table column attributes in the appropriate places will result in a decent looking site. Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#161261) next »