View Single Post
  #2 (permalink)  
Old 11-02-09, 05:51 PM
Jcbones Jcbones is offline
Aspiring Coder
 
Join Date: Mar 2009
Location: North Carolina, USA
Posts: 516
Thanks: 5
Thanked 47 Times in 44 Posts
Without your code, I cannot help alot, but you could add some if statements to it.

PHP Code:

$result mysql_query($sql);

while(
$row mysql_fetch_assoc($result)) {
if(!empty(
$row['company'])) {
  echo 
'<tr><td>Company name</td></tr>';
}
if(!empty(
$row['contact'])) {
  echo 
'<tr><td>Contact name</td></tr>';
}
if(!empty(
$row['add1'])) {
  echo 
'<tr><td>Address 1</td></tr>';
}
if(!empty(
$row['add2'])) {
  echo 
'<tr><td>Address 2</td></tr>';
}
if(!empty(
$row['city'])) {
  echo 
'<tr><td>City, State Zip</td></tr>';
}

Or something like that.
Reply With Quote