Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá, peguei aqui um sistema de cadastro e modifiquei algumas coisas, porém agora tenho um erro ao "editar" dados do banco de dados na pagina... o link da pagina: http://doguinhos.com/cadastro/listar.php acredito que tenha algum erro no código.... <?php
if(file_exists("init.php")) { require "init.php". } else {
echo "Arquivo init.php nao foi encontrado". exit. } if(!function_exists("Abre_Conexao")) { echo "Erro o arquivo init.php foi auterado, nao existe a função Abre_Conexao". exit. }
$id = $_GET["id"]. Abre_Conexao(). $re = mysql_query("select count(*) as total from usuarios where id_cliente = $id"). $total = mysql_result($re, 0, "total"). if($total == 1) { $re = mysql_query("select * from usuarios, estados where estados.id_estado = usuarios.fk_estado and usuarios.id_cliente = $id"). $dados = mysql_fetch_array($re). }?>
<?php $id = $l["id_cliente"]. $nome = $l["nome"]. $denominacao = $l["denominacao"]. $endereco = $l["endereco"]. $cep = $l["cep"]. $bairro = $l["bairro"]. $cidade = $l["cidade"]. $fone = $l["fone"]. $fax = $l["fax"]. $cnpj = $l["cnpj"]. $inscricao = $l["inscricao"]. $ramo = $l["ramo"]. $comprador = $l["comprador"]. $frete = $l["frete"]. $entrega = $l["entrega"]. $cobranca = $l["cobranca"]. $transporte = $l["transporte"]. $condicoes = $l["condicoes"]. $pendencias = $l["pendencias"]. $outros = $l["outros"]. }
@mysql_close().?> <!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=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css" id="css">
<form id="form1" name="form1" method="post" action="salvar_edicao.php">
<input type="hidden" name="id" value="<?php echo $id.?>" />
<div class="hea"> <div align="center"><img src="./img/logo.png" alt="Ficha de Cliente"> </div> <div id="date402ydbno" class="link imagem" style="left:730px. top:100%. width:186px. height:30px. "> <input type="hidden" id="date402ydbnohf" name="date / time1" value=""><span id="date402ydbnodate">Sunday, 21 January - 1900</span> <script type="text/javascript">var date402ydbnoaDaysOfWeek. var date402ydbnoaMonthsOfYear. var date402ydbnoiDate=new Date(). function date402ydbnosetupDate() { var iDaysOfWeek='Domingo, Segunda, Terca, Quarta, Quinta, Sexta, Sabado'. var iMonthsOfYear='Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro'. date402ydbnoaDaysOfWeek=iDaysOfWeek.split(','). date402ydbnoaMonthsOfYear=iMonthsOfYear.split(','). } function date402ydbnoshowDate() { var aDOW=date402ydbnoaDaysOfWeek. var aMOY=date402ydbnoaMonthsOfYear. var iDate=new Date(). var sDate=aDOW[iDate.getDay()]+', '+iDate.getDate()+' de '+aMOY[iDate.getMonth()]+' de '+iDate.getFullYear(). document.getElementById('date402ydbnodate').innerHTML=sDate. document.getElementById('date402ydbnohf').value=sDate. } date402ydbnosetupDate(). date402ydbnoshowDate(). setInterval('date402ydbnoshowDate()',999). </script> </div> <div class="heade"> <div class="texto" style="left:20px. top:16px. "><p>Razão Social / Nome Cliente</p> </div> <div class="texto" style="left:500px. top:16px. "><p>Denominação do Estabelecimento</p> </div> <div class="texto" style="left:20px. top:90px. "><p>Endereço</p> </div> <div class="texto" style="left:430px. top:90px. "><p>CEP</p> </div> <div class="texto" style="left:690px. top:90px. "><p>Bairro</p> </div> <div class="texto" style="left:20px. top:164px. "><p>Cidade</p> </div> <div class="texto" style="left:280px. top:164px. "><p>Estado</p> </div> <div class="texto" style="left:430px. top:164px. "><p>Fone</p> </div> <div class="texto" style="left:690px. top:164px. "><p>Fax</p> </div> <div class="texto" style="left:20px. top:238px. "><p>CNPJ</p> </div> <div class="texto" style="left:240px. top:238px. "><p>Inscrição N°</p> </div> <div class="texto" style="left:430px. top:238px. "><p>Ramo na Atividade</p> </div> <div class="texto" style="left:690px. top:238px. "><p>Nome do Comprador</p> </div> <div class="texto" style="left:20px. top:312px. "><p>Frete</p> </div> <div class="texto" style="left:323px. top:312px. "><p>Local da Entrega</p> </div> <div class="texto" style="left:626px. top:312px. "><p>Endereço da Cobrança</p> </div> <div class="texto" style="left:20px. top:386px. "><p>Empresa Transportadora</p> </div> <div class="texto" style="left:323px. top:386px. "><p>Condições de Faturamento</p> </div> <div class="texto" style="left:626px. top:386px. "><p>Pendências / Providências</p> </div> <div class="texto" style="left:20px. top:460px. "><p>Outros</p> </div> <select id="cidade" class="imagem" style="left:20px. top:195px. width:220px. height:26px. " name="cidade"> <option value="Contagem">Contagem</option> <option value="Belo Horizonte">Belo Horizonte</option> <option value="Betim">Betim</option> <option value="Sarzedo">Sarzedo</option> <option value="Brumadinho">Brumadinho</option> <option value="Congonhas">Congonhas</option> <option value="Esmeraldas">Esmeraldas</option> <option value="Ibirité">Ibirite</option> <option value="Jaboticatuba">Jaboticatuba</option> <option value="Lagoa Santa">Lagoa Santa</option> <option value="Matozinhos">Matozinhos</option> <option value="Nova Lima">Nova Lima</option> <option value="Ouro Preto">Ouro Preto</option> <option value="Pedro Leopoldo">Pedro Leopoldo</option> <option value="Prudente Morais">Prudente Morais</option> <option value="Raposos">Raposos</option> <option value="RioAcima">Rio Acima</option> <option value="RibeirãodasNeves">Ribeirao das Neves</option> <option value="SeteLagoas">Sete Lagoas</option> <option value="Santa Luzia">Santa Luzia</option> <option value="Vianopolis">Vianopolis</option> </select> <td><select name="estados" id="estados" style="left:280px. top:195px. width:102px. height:26px. " class="imagem" >
<?php $id = $l["id_estado"]. $estado = $l["estado"]. $uf = $l["uf"]. echo "<option value=\"$id\">$uf - $estado</option>\n". }
@mysql_close().?> </select> <input type="text" value="<?php echo $nome.?>" id="inscricao" class="imagem" style="left:20px. top:45px. width:420px. height:35px. "name="nome"> <input type="text" value="<?php echo $denominacao.?>"id="denominacao" class="imagem" style="left:500px. top:45px. width:400px. height:35px. "name="denominacao"> <input type="text" value="<?php echo $endereco.?>"id="endereco" class="imagem" style="left:20px. top:119px. width:350px. height:35px. "name="endereco"> <input type="text" value="<?php echo $cep.?>"id="cep" class="imagem" style="left:430px. top:119px. width:200px. height:35px. "name="cep"> <input type="text" value="<?php echo $bairro.?>"id="bairro" class="imagem" style="left:690px. top:119px. width:200px. height:35px. "name="bairro"> <input type="text" value="<?php echo $fone.?>"id="fone" class="imagem" style="left:430px. top:193px. width:200px. height:35px. "name="fone"> <input type="text" value="<?php echo $fax.?>"id="fax" class="imagem" style="left:690px. top:193px. width:200px. height:35px. "name="fax"> <input type="text" value="<?php echo $cnpj.?>"id="cnpj" class="imagem" style="left:20px. top:267px. width:180px. height:35px. "name="cnpj"> <input type="text" value="<?php echo $inscricao.?>"id="inscricao" class="imagem" style="left:240px. top:267px. width:150px. height:35px. "name="inscricao"> <input type="text" value="<?php echo $ramo.?>"id="ramo" class="imagem" style="left:430px. top:267px. width:200px. height:35px. "name="ramo"> <input type="text" value="<?php echo $comprador.?>"id="comprador" class="imagem" style="left:690px. top:267px. width:200px. height:35px. "name="comprador"> <input type="text" value="<?php echo $frete.?>"id="frete" class="imagem" style="left:20px. top:341px. width:265px. height:35px. "name="frete"> <input type="text" value="<?php echo $entrega.?>"id="entrega" class="imagem" style="left:323px. top:341px. width:265px. height:35px. "name="entrega"> <input type="text" value="<?php echo $cobranca.?>"id="cobranca" class="imagem" style="left:626px. top:341px. width:265px. height:35px. "name="cobranca"> <input type="text" value="<?php echo $transporte.?>"id="transporte" class="imagem" style="left:20px. top:415px. width:265px. height:35px. "name="transporte"> <input type="text" value="<?php echo $condicoes.?>"id="condicoes" class="imagem" style="left:323px. top:415px. width:265px. height:35px. "name="condicoes"> <input type="text" value="<?php echo $pendencias.?>"id="pendencias" class="imagem" style="left:626px. top:415px. width:265px. height:35px. "name="pendencias"> <input type="submit" name="Submit" class="botao" style="top:510px. left:740px. width:150px. color:#ffffff" value="Cadastrar "> <a href="#"><img class="imagem" alt="Apagar dados" src="./img/limpar.png" style="left:670px. top:520px. width:30px. height:30px. "></a> <textarea id="outros" class="imagem area" placeholder="<?php echo $outros.?>" name="outros" style="left:20px. top:490px. width:567px. height:83px. "></textarea> </div> <div class="head"> <div class="texto" style="left:20px. top:10px. "><p>Vendedor(a)</p> <select id="vendedor" class="imagem" style="left:120px. top:0px. width:150px. height:26px. " name="options list1"> <option value="Marlirio Jose">Marlirio Jose</option> <option value=" Thais Layla"> Thais Layla</option> <option value=" Gabriel Alonso"> Gabriel Alonso</option> <option value=" Angela Marcia"> Angela Marcia</option> <option value=" Marcos Junior"> Marcos Junior</option> </select> <div id="desenvolvido" class="imagem link desenvolvido"<p>Desenvolvido por: <a target="blank_" href="[http://fb.com/lucasphilipe](http://fb.com/lucasphilipe)">Lucas Philipe</p> </div></form></p></meta>
</body></html>Quando vai em editar, que erro aparece?
Por que você diz isso?