
March 10th, 2000, 10:28 AM
|
|
Junior Member
|
|
Join Date: Mar 2000
Posts: 24
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I'm tring to format output from a mysql table in html table fromat. I'm using the statement below and am having trouble with formating specifically the table width, border width, etc. My code is:
$result = mysql_query("SELECT * FROM events order by Name ASC",$db);
while ($myrow = mysql_fetch_array($result)) {
printf("<table><tr><td width="25%"><a href="%s?id=%s">%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </a> n ", $PHP_SELF, $myrow["ID"], $myrow["Name"], $myrow["Address1"], $myrow["Address2"], $myrow["City"], $myrow["State"], $myrow["Phone1"]);
printf("<td><a href="%s?id=%s&delete=yes">(DELETE)</a></td></tr></table>", $PHP_SELF, $myrow["ID"]);
}
--------------------------------------
In html it should be something like:
<table border="1" width="100%">
<tr>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
</tr>
</table>
Could someone please help?
Thanks in advance.
Bob
|