Listar dados em um tabela?
eu tenho esse code (abaix) mas estou apanhando, pq eu queria lista-los da seguinte forma:
ID ! NOME DA EMPRESA ! CLIENTE ! EMAIL ! DEPTO ! FONE ! INDICADOS ! EMAIL ! DEPTO ! FONE !
Na parte dos indicados vai haver de 1 a 6 indicados mas quando insiro mais indicados eles nao aparecem listados na tabela no lugar indicado (INDICADO - da tb) alguem sabe me dizer qual code terei que colocar?
<?php
if(mysql_num_rows($resultado) < 1) {
exit;
}
?>
</div>
<table width="800" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" class="style9">
<tr>
<th width="14" class="style9">ID</th>
<th width="68" class="style9">NOME DA EMPRESA</th>
<th width="58" class="style9">CLIENTE</th>
<th width="43" class="style9">EMAIL</th>
<th width="115" class="style9">DEPARTAMENTO</th>
<th width="39" class="style9">FONE</th>
<th width="68" class="style9">INDICADO</th>
<th width="43" class="style9">EMAIL</th>
<th width="115" class="style9">DEPARTAMENTO</th>
<th width="59" class="style9">FONE</th>
</tr>
<?phpwhile($l = mysql_fetch_array($resultado)) {
$id = $l["id"];
$nomedaempresa = $l["nomedaempresa"];
$nome = $l["nome"];
$email = $l["email"];
$depto = $l["depto"];
$fone = $l["fone"];
$nome1 = $l["nome1"];
$email1 = $l["email1"];
$depto1 = $l["depto1"];
$fone1 = $l["fone1"];
echo"
<tr>
<td>$id</td>
<td>$nomedaempresa</td>
<td>$nome</td>
<td>$email</td>
<td>$depto</td>
<td>$fone</td>
<td>$nome1</td>
<td>$email1</td>
<td>$depto1</td>
<td>$fone1</td>
</tr>\n";
}
?>
</table>
</body>
</html>neste exemplo acima só esta com a opçao de 1 indicado, mas quando insiro 2 ou mais eles nao ficam listados corretamente. =\
Discussão (6)
Carregando comentários...