Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Bom dia a todos.
E o seguinte eu to com um arquivo que chama segmento.php e nele qndo entra tem que aparecer os clientes cadastrados com situacao=0. beleza isso eu ja consegui o problema e q esta aparecendo apenas 1 cadastro e esta vindo so 1 letra de cada campo.
Ex: Tem la nome: ao inves de aparecer Henrique aparece H
entrem ai e vejam para vcs terem uma nocao exata.
Login: tecnologia
senha: teste
segmento.php
<!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">](http://www.w3.org/1999/xhtml)
<?php?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Segmentos</title>
<style type="text/css">.style1 {
color: #FFFFFF
}</style>
</head>
<body>
<?php
$re = mysql_query("SELECT * FROM tb_clientes AS tb_clientes INNER JOIN tb_segmento AS tb_segmento ON tb_segmento.id_segmento = tb_clientes.id_segmento WHERE situacao='0' ORDER BY tb_segmento.segmento",$sql);?>
<?php $id = $l["id_segmento"];
$nome = $l["empresa_user"];
$chave = $l["chave_user"];
}
@mysql_close();
?>
<div align="center">
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#6699CC"><div align="center" class="style2">Incluir Segmentos</div></td>
</tr>
</table>
</div>
<form id="form_user" name="form1" method="post" action="incluir_segmento.php">
<div align="center">
<table width="998" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="231" bgcolor="#6699CC"><div align="center" class="style2">Nome Cliente</div></td>
<td width="214" bgcolor="#6699CC"><div align="center" class="style2">Palavras Chave</div></td>
<td width="260" bgcolor="#6699CC"><div align="center" class="style2">Segmentos</div></td>
<td width="206" bgcolor="#6699CC"><div align="center"><span class="style2">Segmentos</span></div></td>
<td width="87" bgcolor="#6699CC"><div align="center"><span class="style2">Liberar</span></div></td>
</tr>
<tr>
<?php
?>
<td bgcolor="ebebeb"><div align="center">
<?php
echo $nome['empresa_user'];
?>
</div></td>
<td bgcolor="ebebeb"><div align="center">
<?php
echo $chave['chave_user'];
?>
</div></td>
<td bgcolor="ebebeb"><div align="center">
<?php
echo $id['id_segmento'];
?>
</div></td>
<td bgcolor="ebebeb"><div align="center">
<select name="segmento2" id="segmento2">
<option value="0" selected="selected"><< Segmentos >></option>
<?php
// Puxa do banco os Segmentos da tb_segmentos e coloca no list/menu
$sql_segmento = mysql_query("SELECT * FROM tb_segmento ORDER BY segmento", $sql)
or die ("ERRO no comando SQL: ".mysql_error());
while($arr = mysql_fetch_array($sql_segmento))?>
<option value="<? echo $arr['id_segmento'];?>"> <? echo $arr['segmento']; ?></option>
<?php
}
?>
</select>
<label>
<input type="submit" name="segm_user" id="segm_user" value="Incluir" />
</label>
</div></td>
<td bgcolor="ebebeb"><div align="center"><a href="libera.php">
<label>
<input type="submit" name="liberar" id="liberar" value="Libera" onclick="libera.php" />
</label>
</a></div></td>
</tr>
</table>
</div>
</form>
<form id="form2" name="form2" method="post" action="salvar_segmento.php">
<table width="450" height="80" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="165" bgcolor="#6699CC"><span class="style1"><strong>Incluir segmento:</strong></span></td>
<td width="285" bgcolor="ebebeb"><div align="center">
<label>
<input type="text" name="in_segmento" id="in_segmento" />
</label>
<label>
<input type="submit" name="incluir" id="incluir" value="Incluir" />
</label>
</div></td>
</tr>
<tr>
<td bgcolor="#6699CC"><span class="style1"><strong>Segmento</strong><strong>s ja inclusos:</strong></span></td>
<td bgcolor="ebebeb"><div align="center">
<label>
<select name="Segmento">
<option value="0" selected><< Segmentos >></option>
<?php
// Puxa do banco os Segmentos da tb_segmentos e coloca no list/menu
$sql_segmento = mysql_query("SELECT * FROM tb_segmento ORDER BY segmento", $sql)
or die ("ERRO no comando SQL: ".mysql_error());
while($arr = mysql_fetch_array($sql_segmento))?>
<option value="<? echo $arr['id_segmento'];?>"> <? echo $arr['segmento']; ?></option>
<?
}
?>
</select>
</label>
</div></td>
</tr>
</table>
</form>
<p align="center"><a href="opcoes.php"><strong>[Voltar para opções!]</strong></a></p>
</body>
</html>Carregando comentários...