473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Doubt in <colgroup>

40
I am creating an address book using php and mysql in which i need to create mailing labels from the list of address in my database.i need to group the addresses in a such a way that only 5 addresses should come in the first row and proceed to the next consecutive rows with the increase in number of data..since i do not know the number of data i could not limit the number of addresses to 5 in each row and i am getting all the addresses in a single line...can anyone help me????


The code is as follows:
[HTML]
<?php
include "connection.php";
$label=mysql_query("select * from address_book") or die("Query failed ".mysql_error());
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table cellpadding="25" cellspacing="25">
<tr>
<?
while($resultset=mysql_fetch_array($label)) {
?>
<td>
<? echo $resultset['Name']; ?><br />
<? echo $resultset['Company']; ?><br />
<? echo $resultset['off_Street']; ?><br />
<? echo $resultset['off_Location']; ?><br />
<? echo $resultset['off_City']; ?><br />
<? echo $resultset['off_State']; ?><br />
<br />
</td>
<?
}
?>
</tr>
</table>
</body>
</html>[/HTML]
Sep 19 '08 #1
0 968

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Daniel Haude | last post by:
Me again! This time I'd like to prevent an entire column of a table to have no word-wrapping. So I defined this class in the style sheet: ..nobr { white-space: nowrap; } When I define...
1
by: F. Da Costa | last post by:
Hi, After trying to get <colgroup><col> working properly on Gecko (moz & firebird) i'm starting to worry a tad about Gecko's ability to use this obvious standard (even IE 5+ works with it)....
1
by: Rob Meade | last post by:
Hi all, I recently read a book regarding improving the performance of web pages loading, one of the suggestions was to add <colgroup> and the relevant <col> tags with information such as cell...
36
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.