Ir para conteúdo
Fórum Script Brasil
  • 0

(Resolvido) Problemas Com Editar Dados No Banco.


Guest Diego Mendes

Pergunta

Guest Diego Mendes

ele pega os dados beleza mais quando eu edito e mando gravar ele fala que os dados foram gravados masi na verdade nada acontece!

alguém pode ajudar??

segue o codigo:

alt_dados.php

<?
include("configuracao.php");

$db = mysql_connect ($host, $login_db, $senha_db);
$basedados = mysql_select_db($database);

$usuario = mysql_query("SELECT * FROM revendedor WHERE ID='$id'") or print (mysql_error());
while($linha = mysql_fetch_array($usuario)){
//Dados Pessoais
$DP_nomebanco = $linha["DP_nome"];
$DP_cpfbanco = $linha["DP_cpf"];
$DP_rgbanco = $linha["DP_rg"];
$DP_dn_diabanco = $linha["DP_dn_dia"];
$DP_dn_mesbanco = $linha["DP_dn_mes"];
$DP_dn_anobanco = $linha["DP_dn_ano"];
$DP_sexobanco = $linha["DP_sexo"];
$DP_endbanco = $linha["DP_end"];
$DP_bairrobanco = $linha["DP_bairro"];
$DP_cidadebanco = $linha["DP_cidade"];
$DP_cepbanco = $linha["DP_cep"];
$DP_estadobanco = $linha["DP_estado"];
$DP_telefonebanco = $linha["DP_telefone"];
$DP_celularbanco = $linha["DP_celular"];
$DP_faxbanco = $linha["DP_fax"];
$DP_emailbanco = $linha["DP_email"];
//Filiacao
$FL_paibanco = $linha["FL_pai"];
$FL_maebanco = $linha["FL_mae"];
//Referencias pessoais
$RP_nomebanco = $linha["RP_nome"];
$RP_endbanco = $linha["RP_end"];
$RP_cidadebanco = $linha["RP_cidade"];
$RP_cepbanco = $linha["RP_cep"];
$RP_estadobanco = $linha["RP_estado"];
$RP_telefonebanco = $linha["RP_telefone"];
$RP_celularbanco = $linha["RP_celular"];
//Referencias comerciais
$RC_nomebanco = $linha["RC_nome"];
$RC_endbanco = $linha["RC_end"];
$RC_cidadebanco = $linha["RC_cidade"];
$RC_cepbanco = $linha["RC_cep"];
$RC_estadobanco = $linha["RC_estado"];
$RC_telefonebanco = $linha["RC_telefone"];
$RC_celularbanco = $linha["RC_celular"];
}
?>
<?
switch ($acao){
case mod:
$db = mysql_connect ($host, $login_db, $senha_db);
$basedados = mysql_select_db($database);

$modificar = mysql_query("UPDATE revendedor SET DP_nome ='$DP_nome' ,
DP_cpf ='$DP_cpf' ,
DP_rg ='$DP_rg',
DP_dn_dia ='$DP_dn_dia',
DP_dn_mes ='$DP_dn_mes',
DP_dn_ano ='$DP_dn_ano',
DP_sexo ='$DP_sexo',
DP_end ='$DP_end',
DP_bairro ='$DP_bairro',
DP_cidade ='$DP_cidade',
DP_cep ='$DP_cep',
DP_estado ='$DP_estado',
DP_telefone ='$DP_telefone',
DP_celular ='$DP_celular',
DP_fax ='$DP_fax',
DP_email ='$DP_email',
FL_pai ='$FL_pai',
FL_mae ='$FL_mae',
RP_nome ='$RP_nome',
RP_end ='$RP_end',
RP_cidade ='$RP_cidade',
RP_cep ='$RP_cep',
RP_estado ='$RP_estado',
RP_telefone ='$RP_telefone',
RP_celular ='$RP_celular',
RP_fax ='$RP_fax',
RC_nome ='$RC_nome',
RC_end ='$RC_end',
RC_cidade ='$RC_cidade',
RC_cep ='$RC_cep',
RC_estado ='$RC_estado',
RC_telefone ='$RC_telefone',
RC_celular ='$RC_celular',
RC_fax='$RC_fax' WHERE DP_nome ='$DP_nome' ") or print (mysql_error());
print"
<META HTTP-EQUIV=REFRESH CONTENT='0; URL=todos_cadastros.php'>
<script type=\"text/javascript\">
alert(\"Atenção: Dados foram atualizados com sucesso. \");
</script>
";
}

?>
<html>
<head>
<title>Alterar Dados</title>

</head>

<body>

<div align="center">
<form action="?acao=mod" method="post" name="cadastro" id="cadastro" onSubmit="">
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="11">id : <? echo $id ?></td>
</tr>
<tr>
<td height="14" colspan="11" bgcolor="#006699"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Dados
Pessoais </font></td>
</tr>
<tr>
<td width="53" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nome:</font></td>
<td colspan="10" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_nome" type="text" disabled id="DP_nome" value="<? echo $DP_nomebanco ?>">
&nbsp;</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">CPF:</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_cpf" type="text" id="DP_cpf3" value="<? echo $DP_cpfbanco ?>">
</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">R.G.:
</font></td>
<td bgcolor="#FFFFFF">&nbsp;</td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_rg" type="text" id="DP_rg3" value="<? echo $DP_rgbanco ?>">
</font></td>
<td width="40" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">D.N.:</font></td>
<td width="159" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_dn_dia" type="text" id="DP_dn_dia" value="<? echo $DP_dn_diabanco ?>" size="2" maxlength="2">
<font size="3"> /</font>
<input name="DP_dn_mes" type="text" id="DP_dn_mes" value="<? echo $DP_dn_mesbanco ?>" size="2" maxlength="2">
<font size="3"> /</font>
<input name="DP_data_ano" type="text" id="DP_dn_ano" value="<? echo $DP_dn_anobanco ?>" size="4" maxlength="4">
</font></td>
<td width="37" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Sexo:</font></td>
<td width="88" bgcolor="#FFFFFF"> <select name="DP_sexo" id="select5">
<option selected><? echo $DP_sexobanco ?></option>
<option value="Feminino">Feminino </option>
<option value="Masculino">Masculino</option>
</select></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endere&ccedil;o</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_end" type="text" id="DP_end" value="<? echo $DP_endbanco ?>">
</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Bairro:
</font></td>
<td width="7" bgcolor="#FFFFFF">&nbsp;</td>
<td width="186" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_bairro" type="text" id="DP_bairro" value="<? echo $DP_bairrobanco ?>">
</font></td>
<td colspan="4" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Cidade:</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_cidade" type="text" id="DP_cidade" value="<? echo $DP_cidadebanco ?>">
</font></td>
<td width="38" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Cep:</font></td>
<td width="6" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;
</font></td>
<td bgcolor="#FFFFFF">&nbsp;</td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_cep" type="text" id="DP_cep3" value="<? echo $DP_cepbanco ?>">
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Estado:</font></td>
<td bgcolor="#FFFFFF"><font color="#0000FF" size="1" face="Verdana, Arial, Helvetica, sans-serif">
<select name="DP_estado" id="select6" type="text">
<option selected> <? echo $DP_estadobanco ?></option>
<option value="AC">AC </option>
<option value="AL">AL </option>
<option value="AM">AM </option>
<option value="AP">AP </option>
<option value="BA">BA </option>
<option value="CE">CE </option>
<option value="DF">DF </option>
<option value="ES">ES </option>
<option value="GO">GO </option>
<option value="MA">MA </option>
<option value="MG">MG </option>
<option value="MS">MS </option>
<option value="muito">muito </option>
<option value="PA">PA </option>
<option value="PB">PB </option>
<option value="PE">PE </option>
<option value="PI">PI </option>
<option value="PR">PR </option>
<option value="RJ">RJ </option>
<option value="RN">RN </option>
<option value="RS">RS </option>
<option value="RO">RO </option>
<option value="RR">RR </option>
<option value="SC">SC </option>
<option value="SP">SP </option>
<option value="SE">SE </option>
<option value="TO">TO </option>
</select>
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Telefone:</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_telefone" type="text" id="DP_telefone" value="<? echo $DP_telefonebanco ?>">
</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Celular:</font></td>
<td bgcolor="#FFFFFF">&nbsp;</td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_celular" type="text" id="DP_celular" value="<? echo $DP_celularbanco ?>">
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Fax:</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_fax" type="text" id="DP_fax" value="<? echo $DP_faxbanco ?>">
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">E-Mail:</font></td>
<td colspan="10" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_email" type="text" id="DP_email" value="<? echo $DP_emailbanco ?>">
</font></td>
</tr>
<tr>
<td colspan="11" bgcolor="#006699"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Filia&ccedil;&atilde;o</font></td>
</tr>
<tr>
<td height="24" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Pai:</font></td>
<td colspan="10" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="FL_pai" type="text" id="FL_pai3" value="<? echo $FL_paibanco ?>" size="50">
</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">M&atilde;e:</font></td>
<td colspan="10" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="FL_mae" type="text" id="FL_mae" value="<? echo $FL_maebanco ?>" size="50">
</font></td>
</tr>
<tr>
<td colspan="11" bgcolor="#006699"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Refer&ecirc;ncias
Pessoais</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nome:</font></td>
<td colspan="10" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RP_nome" type="text" id="RP_nome3" value="<? echo $RP_nomebanco ?>" size="40">
</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endere&ccedil;o:</font></td>
<td colspan="10" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RP_end" type="text" id="RP_end3" value="<? echo $RP_endbanco ?>">
</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Cidade:</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RP_cidade" type="text" id="RP_cidade" value="<? echo $RP_cidadebanco ?>">
</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Cep:</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RP_cep" type="text" id="RP_cep3" value="<? echo $RP_cepbanco ?>">
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Estado:</font></td>
<td bgcolor="#FFFFFF"><font color="#0000FF" size="1" face="Verdana, Arial, Helvetica, sans-serif">
<select name="RP_estado" id="RP_estado" type="text">
<option><? echo $RP_estadobanco ?></option>
<option value="AC">AC </option>
<option value="AL">AL </option>
<option value="AM">AM </option>
<option value="AP">AP </option>
<option value="BA">BA </option>
<option value="CE">CE </option>
<option value="DF">DF </option>
<option value="ES">ES </option>
<option value="GO">GO </option>
<option value="MA">MA </option>
<option value="MG">MG </option>
<option value="MS">MS </option>
<option value="muito">muito </option>
<option value="PA">PA </option>
<option value="PB">PB </option>
<option value="PE">PE </option>
<option value="PI">PI </option>
<option value="PR">PR </option>
<option value="RJ">RJ </option>
<option value="RN">RN </option>
<option value="RS">RS </option>
<option value="RO">RO </option>
<option value="RR">RR </option>
<option value="SC">SC </option>
<option value="SP">SP </option>
<option value="SE">SE </option>
<option value="TO">TO </option>
</select>
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Telefone:</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RP_telefone" type="text" id="RP_telefone" value="<? echo $RP_telefonebanco ?>">
</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Celular:</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RP_celular" type="text" id="RP_celular" value="<? echo $RP_celularbanco ?>">
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
</tr>
<tr>
<td colspan="11" bgcolor="#006699"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Refer&ecirc;ncias
Comerciais</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nome:</font></td>
<td colspan="10" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RC_nome" type="text" id="RC_nome3" value="<? echo $RC_nomebanco ?>" size="40">
</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Endere&ccedil;o:</font></td>
<td colspan="10" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RC_end" type="text" id="RC_end" value="<? echo $RC_endbanco ?>">
</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Cidade:</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RC_cidade" type="text" id="RC_cidade3" value="<? echo $RC_cidadebanco ?>">
</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Cep:</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RC_cep" type="text" id="RC_cep3" value="<? echo $RC_cepbanco ?>">
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Estado:</font></td>
<td bgcolor="#FFFFFF"><font color="#0000FF" size="1" face="Verdana, Arial, Helvetica, sans-serif">
<select name="RC_estado" id="RC_estado" type="text">
<option><? echo $RC_estadobanco ?></option>
<option value="AC">AC </option>
<option value="AL">AL </option>
<option value="AM">AM </option>
<option value="AP">AP </option>
<option value="BA">BA </option>
<option value="CE">CE </option>
<option value="DF">DF </option>
<option value="ES">ES </option>
<option value="GO">GO </option>
<option value="MA">MA </option>
<option value="MG">MG </option>
<option value="MS">MS </option>
<option value="muito">muito </option>
<option value="PA">PA </option>
<option value="PB">PB </option>
<option value="PE">PE </option>
<option value="PI">PI </option>
<option value="PR">PR </option>
<option value="RJ">RJ </option>
<option value="RN">RN </option>
<option value="RS">RS </option>
<option value="RO">RO </option>
<option value="RR">RR </option>
<option value="SC">SC </option>
<option value="SP">SP </option>
<option value="SE">SE </option>
<option value="TO">TO </option>
</select>
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Telefone:</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RC_telefone" type="text" id="RC_telefone" value="<? echo $RC_telefonebanco ?>">
</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Celular:</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td colspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="RC_celular" type="text" id="RC_celular" value="<? echo $RC_celularbanco ?>">
</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td colspan="2" rowspan="2" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;
<input name="Submit" type="submit" id="Submit" value="Atualizar">
</font></td>
</tr>
<tr>
<td height="53" bgcolor="#FFFFFF">&nbsp;</td>
<td width="78" bgcolor="#FFFFFF">&nbsp;</td>
<td width="78" bgcolor="#FFFFFF">&nbsp;</td>
<td colspan="2" bgcolor="#FFFFFF">&nbsp;</td>
<td colspan="2" bgcolor="#FFFFFF">&nbsp;</td>
<td bgcolor="#FFFFFF">&nbsp;</td>
<td bgcolor="#FFFFFF">&nbsp;</td>
</tr>
</table>
</form>
</div>
</body>
</html>[/codebox]

Link para o comentário
Compartilhar em outros sites

7 respostass a esta questão

Posts Recomendados

  • 0
Guest Diego Mendes

EU SO tirei o disable do campo nome funciono normal ... porque? eu to com um problema aqui maior um pokin

ta dando erro na sintax quando mando edtar esse :

alt_dados_pedidos.php:

<?
include("configuracao_pedidos.php");

$db = mysql_connect ($host, $login_db, $senha_db);
$basedados = mysql_select_db($database);

$usuario = mysql_query("SELECT * FROM pedidos WHERE ID='$id'") or print (mysql_error());
while($linha = mysql_fetch_array($usuario)){
//Dados do pedido
$DP_nomebanco = $linha["DP_nome"];
$data = $linha["data"];
$previsao_de_entrega = $linha["previsao_de_entrega"];
$status = $linha["status"];

//Pedido
$ref_1 = $linha["ref_1"];
$ref_2 = $linha["ref_2"];
$ref_3 = $linha["ref_3"];
$ref_4 = $linha["ref_4"];
$ref_5 = $linha["ref_5"];
$ref_6 = $linha["ref_6"];
$ref_7 = $linha["ref_7"];
$ref_8 = $linha["ref_8"];
$ref_9 = $linha["ref_9"];
$ref_10 = $linha["ref_10"];
$ref_11 = $linha["ref_11"];
$ref_12 = $linha["ref_12"];
$ref_13 = $linha["ref_13"];
$ref_14 = $linha["ref_14"];
$ref_15 = $linha["ref_15"];
$ref_16 = $linha["ref_16"];
$ref_17 = $linha["ref_17"];
$ref_18 = $linha["ref_18"];
$ref_19 = $linha["ref_19"];
$ref_20 = $linha["ref_20"];
$ref_21 = $linha["ref_21"];
$ref_22 = $linha["ref_22"];
$ref_23 = $linha["ref_23"];
$ref_24 = $linha["ref_24"];
$ref_25 = $linha["ref_25"];
$ref_26 = $linha["ref_26"];
$ref_27 = $linha["ref_27"];
$ref_28 = $linha["ref_28"];
$ref_29 = $linha["ref_29"];
$ref_30 = $linha["ref_30"];

$quant_1 = $linha["quant_1"];
$quant_2 = $linha["quant_2"];
$quant_3 = $linha["quant_3"];
$quant_4 = $linha["quant_4"];
$quant_5 = $linha["quant_5"];
$quant_6 = $linha["quant_6"];
$quant_7 = $linha["quant_7"];
$quant_8 = $linha["quant_8"];
$quant_9 = $linha["quant_9"];
$quant_10 = $linha["quant_10"];
$quant_11 = $linha["quant_11"];
$quant_12 = $linha["quant_12"];
$quant_13 = $linha["quant_13"];
$quant_14 = $linha["quant_14"];
$quant_15 = $linha["quant_15"];
$quant_16 = $linha["quant_16"];
$quant_17 = $linha["quant_17"];
$quant_18 = $linha["quant_18"];
$quant_19 = $linha["quant_19"];
$quant_20 = $linha["quant_20"];
$quant_21 = $linha["quant_21"];
$quant_22 = $linha["quant_22"];
$quant_23 = $linha["quant_23"];
$quant_24 = $linha["quant_24"];
$quant_25 = $linha["quant_25"];
$quant_26 = $linha["quant_26"];
$quant_27 = $linha["quant_27"];
$quant_28 = $linha["quant_28"];
$quant_29 = $linha["quant_29"];
$quant_30 = $linha["quant_30"];

$prod_1 = $linha["prod_1"];
$prod_2 = $linha["prod_2"];
$prod_3 = $linha["prod_3"];
$prod_4 = $linha["prod_4"];
$prod_5 = $linha["prod_5"];
$prod_6 = $linha["prod_6"];
$prod_7 = $linha["prod_7"];
$prod_8 = $linha["prod_8"];
$prod_9 = $linha["prod_9"];
$prod_10 = $linha["prod_10"];
$prod_11 = $linha["prod_11"];
$prod_12 = $linha["prod_12"];
$prod_13 = $linha["prod_13"];
$prod_14 = $linha["prod_14"];
$prod_15 = $linha["prod_15"];
$prod_16 = $linha["prod_16"];
$prod_17 = $linha["prod_17"];
$prod_18 = $linha["prod_18"];
$prod_19 = $linha["prod_19"];
$prod_20 = $linha["prod_20"];
$prod_21 = $linha["prod_21"];
$prod_22 = $linha["prod_22"];
$prod_23 = $linha["prod_23"];
$prod_24 = $linha["prod_24"];
$prod_25 = $linha["prod_25"];
$prod_26 = $linha["prod_26"];
$prod_27 = $linha["prod_27"];
$prod_28 = $linha["prod_28"];
$prod_29 = $linha["prod_29"];
$prod_30 = $linha["prod_30"];

$valor_1 = $linha["valor_1"];
$valor_2 = $linha["valor_2"];
$valor_3 = $linha["valor_3"];
$valor_4 = $linha["valor_4"];
$valor_5 = $linha["valor_5"];
$valor_6 = $linha["valor_6"];
$valor_7 = $linha["valor_7"];
$valor_8 = $linha["valor_8"];
$valor_9 = $linha["valor_9"];
$valor_10 = $linha["valor_10"];
$valor_11 = $linha["valor_11"];
$valor_12 = $linha["valor_12"];
$valor_13 = $linha["valor_13"];
$valor_14 = $linha["valor_14"];
$valor_15 = $linha["valor_15"];
$valor_16 = $linha["valor_16"];
$valor_17 = $linha["valor_17"];
$valor_18 = $linha["valor_18"];
$valor_19 = $linha["valor_19"];
$valor_20 = $linha["valor_20"];
$valor_21 = $linha["valor_21"];
$valor_22 = $linha["valor_22"];
$valor_23 = $linha["valor_23"];
$valor_24 = $linha["valor_24"];
$valor_25 = $linha["valor_25"];
$valor_26 = $linha["valor_26"];
$valor_27 = $linha["valor_27"];
$valor_28 = $linha["valor_28"];
$valor_29 = $linha["valor_29"];
$valor_30 = $linha["valor_30"];
}
?>
<?
switch ($acao){
case mod:
$db = mysql_connect ($host, $login_db, $senha_db);
$basedados = mysql_select_db($database);

$modificar = mysql_query("UPDATE revendedor SET DP_nome ='$DP_nome'' ,
ref_1 ='$ref_1' ,
ref_2 ='$ref_2' ,
ref_3 ='$ref_3' ,
ref_4 ='$ref_4' ,
ref_5 ='$ref_5' ,
ref_6 ='$ref_6' ,
ref_7 ='$ref_7' ,
ref_8 ='$ref_8' ,
ref_9 ='$ref_9' ,
ref_10 ='$ref_10' ,
ref_11 ='$ref_11' ,
ref_12 ='$ref_12' ,
ref_13 ='$ref_13' ,
ref_14 ='$ref_14' ,
ref_15 ='$ref_15' ,
ref_16 ='$ref_16' ,
ref_17 ='$ref_17' ,
ref_18 ='$ref_18' ,
ref_19 ='$ref_19' ,
ref_20 ='$ref_20' ,
ref_21 ='$ref_21' ,
ref_22 ='$ref_22' ,
ref_23 ='$ref_23' ,
ref_24 ='$ref_24' ,
ref_25 ='$ref_25' ,
ref_26 ='$ref_26' ,
ref_27 ='$ref_27' ,
ref_28 ='$ref_28' ,
ref_29 ='$ref_29' ,
ref_30 ='$ref_30' ,

quant_1 ='$quant_1' ,
quant_2 ='$quant_2' ,
quant_3 ='$quant_3' ,
quant_4 ='$quant_4' ,
quant_5 ='$quant_5' ,
quant_6 ='$quant_6' ,
quant_7 ='$quant_7' ,
quant_8 ='$quant_8' ,
quant_9 ='$quant_9' ,
quant_10 ='$quant_10' ,
quant_11 ='$quant_11' ,
quant_12 ='$quant_12' ,
quant_13 ='$quant_13' ,
quant_14 ='$quant_14' ,
quant_15 ='$quant_15' ,
quant_16 ='$quant_16' ,
quant_17 ='$quant_17' ,
quant_18 ='$quant_18' ,
quant_19 ='$quant_19' ,
quant_20 ='$quant_20' ,
quant_21 ='$quant_21' ,
quant_22 ='$quant_22' ,
quant_23 ='$quant_23' ,
quant_24 ='$quant_24' ,
quant_25 ='$quant_25' ,
quant_26 ='$quant_26' ,
quant_27 ='$quant_27' ,
quant_28 ='$quant_28' ,
quant_29 ='$quant_29' ,
quant_30='$quant_30' ,

prod_1 ='$prod_1' ,
prod_2 ='$prod_2' ,
prod_3 ='$prod_3' ,
prod_4 ='$prod_4' ,
prod_5 ='$prod_5' ,
prod_6 ='$prod_6' ,
prod_7 ='$prod_7' ,
prod_8 ='$prod_8' ,
prod_9 ='$prod_9' ,
prod_10 ='$prod_10' ,
prod_11 ='$prod_11' ,
prod_12 ='$prod_12' ,
prod_13 ='$prod_13' ,
prod_14 ='$prod_14' ,
prod_15 ='$prod_15' ,
prod_16 ='$prod_16' ,
prod_17 ='$prod_17' ,
prod_18 ='$prod_18' ,
prod_19 ='$prod_19' ,
prod_20 ='$prod_20' ,
prod_21 ='$prod_21' ,
prod_22 ='$prod_22' ,
prod_23 ='$prod_23' ,
prod_24 ='$prod_24' ,
prod_25 ='$prod_25' ,
prod_26 ='$prod_26' ,
prod_27 ='$prod_27' ,
prod_28 ='$prod_28' ,
prod_29 ='$prod_29' ,
prod_30 ='$prod_30' ,

valor_1 ='$valor_1' ,
valor_2='$valor_2' ,
valor_3 ='$valor_3' ,
valor_4 ='$valor_4' ,
valor_5 ='$valor_5' ,
valor_6='$valor_6' ,
valor_7='$valor_7' ,
valor_8 ='$valor_8' ,
valor_9 ='$valor_9' ,
valor_10 ='$valor_10' ,
valor_11 ='$valor_11' ,
valor_12 ='$valor_12' ,
valor_13 ='$valor_13' ,
valor_14 ='$valor_14' ,
valor_15 ='$valor_15' ,
valor_16 ='$valor_16' ,
valor_17 ='$valor_17' ,
valor_18 ='$valor_18' ,
valor_19 ='$valor_19' ,
valor_20 ='$valor_20' ,
valor_21 ='$valor_21' ,
valor_22 ='$valor_22' ,
valor_23 ='$valor_23' ,
valor_24 ='$valor_24' ,
valor_25 ='$valor_25' ,
valor_26 ='$valor_26' ,
valor_27 ='$valor_27' ,
valor_28 ='$valor_28' ,
valor_29 ='$valor_29' ,
valor_30 ='$valor_30'
WHERE DP_nome ='$DP_nome' ") or print (mysql_error());
print"
<META HTTP-EQUIV=REFRESH CONTENT='0; URL=todos_pedidos.php'>
<script type=\"text/javascript\">
alert(\"Atenção: Dados foram atualizados com sucesso. \");
</script>
";
}

?>
<html>
<head>
<title>Alterar Dados</title>

</head>

<body>

<div align="center">
<form action="?acao=mod" method="post" name="cadastro" id="cadastro" onSubmit="">
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="7"></td>
</tr>
<tr>
<td height="14" colspan="7" bgcolor="#006699"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Dados
Pessoais </font></td>
</tr>
<tr>
<td width="48" bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nome:</font></td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input name="DP_nome" type="text" disabled id="DP_nome2" value="<? echo $DP_nomebanco ?>">
&nbsp;</font></td>
<td colspan="5" bgcolor="#FFFFFF"><table width="493" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="37">Data:</td>
<td width="74"><input name="data" type="text" id="data" value="<? echo $data ?>" size="10"></td>
<td width="103">Data de entrega: </td>
<td width="177"><input name="previsao_de_entrega" type="text" id="previsao_de_entrega" value="<? echo $previsao_de_entrega ?>"></td>
<td width="51">&nbsp;</td>
<td width="51">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="7">&nbsp;</td>
</tr>
<tr>
<td height="246" colspan="5" bgcolor="#FFFFFF"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#006699">
<td width="27" height="16"> <div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">REF.</font></div></td>
<td><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Quant.</font></td>
<td><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Produto</font></td>
<td width="132"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Pre&ccedil;o</font></td>
</tr>
<tr>
<td height="24">
<div align="center">
<input name="ref_1" type="text" id="ref_1" value="<? echo $ref_1 ?>" size="4">
</div></td>
<td width="61"><div align="center">
<input name="quant_1" type="text" id="quant_1" value="<? echo $quant_1 ?>" size="3">
</div></td>
<td width="380"><div align="center">
<input name="prod_1" type="text" value="<? echo $prod_1 ?>" size="60">
</div></td>
<td width="132"><div align="center">
<input name="valor_1" type="text" id="valor_1" value="<? echo $valor_1 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_2" type="text" id="ref_2" value="<? echo $ref_2 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_2" type="text" id="quant_2" value="<? echo $quant_2 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_2" type="text" value="<? echo $prod_2 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_2" type="text" id="valor_2" value="<? echo $valor_2 ?>" size="12">
</div></td>
</tr>
<tr>
<td height="24"> <div align="center">
<input name="ref_3" type="text" id="ref_3" value="<? echo $ref_3 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_3" type="text" id="quant_3" value="<? echo $quant_3 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_3" type="text" value="<? echo $prod_3 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_3" type="text" id="valor_3" value="<? echo $valor_3 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_4" type="text" id="ref_4" value="<? echo $ref_4 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_4" type="text" id="quant_4" value="<? echo $quant_4 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_4" type="text" value="<? echo $prod_4 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_4" type="text" id="valor_4" value="<? echo $valor_4 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_5" type="text" id="ref_5" value="<? echo $ref_5 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_5" type="text" id="quant_5" value="<? echo $quant_5 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_5" type="text" value="<? echo $prod_5 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_5" type="text" id="valor_5" value="<? echo $valor_5 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_6" type="text" id="ref_6" value="<? echo $ref_6 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_6" type="text" id="quant_6" value="<? echo $quant_6 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_6" type="text" value="<? echo $prod_6 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_6" type="text" id="valor_6" value="<? echo $valor_6 ?>" size="12">
</div></td>
</tr>
<tr>
<td height="24">
<div align="center">
<input name="ref_7" type="text" id="ref_7" value="<? echo $ref_7 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_7" type="text" id="quant_7" value="<? echo $quant_7 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_7" type="text" value="<? echo $prod_7 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_7" type="text" id="valor_7" value="<? echo $valor_7 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_8" type="text" id="ref_8" value="<? echo $ref_8 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_8" type="text" id="quant_8" value="<? echo $quant_8 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_8" type="text" value="<? echo $prod_8 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_8" type="text" id="valor_8" value="<? echo $valor_8 ?>" size="12">
</div></td>
</tr>
<tr>
<td height="25"> <div align="center">
<input name="ref_9" type="text" id="ref_9" value="<? echo $ref_9 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_9" type="text" id="quant_9" value="<? echo $quant_9 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_9" type="text" value="<? echo $prod_9 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_9" type="text" id="valor_9" value="<? echo $valor_9 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_10" type="text" id="ref_10" value="<? echo $ref_10 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_10" type="text" id="quant_10" value="<? echo $quant_10 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_10" type="text" value="<? echo $prod_10 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_10" type="text" id="valor_10" value="<? echo $valor_10 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_11" type="text" id="ref_11" value="<? echo $ref_11 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_11" type="text" id="quant_11" value="<? echo $quant_11 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_11" type="text" value="<? echo $prod_11 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_11" type="text" id="valor_11" value="<? echo $valor_11 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_12" type="text" id="ref_12" value="<? echo $ref_12 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_12" type="text" id="quant_12" value="<? echo $quant_12 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_12" type="text" value="<? echo $prod_12 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_12" type="text" id="valor_12" value="<? echo $valor_12 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_13" type="text" id="ref_13" value="<? echo $ref_13 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_13" type="text" id="quant_13" value="<? echo $ref_13 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_13" type="text" value="<? echo $prod_13 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_13" type="text" id="valor_13" value="<? echo $valor_13 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_14" type="text" id="ref_14" value="<? echo $ref_14 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_14" type="text" id="quant_14" value="<? echo $quant_14 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_14" type="text" value="<? echo $prod_14 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_14" type="text" id="valor_14" value="<? echo $valor_14 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_15" type="text" id="ref_15" value="<? echo $ref_15 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_15" type="text" id="quant_15" value="<? echo $quant_15 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_15" type="text" value="<? echo $prod_15 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_15" type="text" id="valor_15" value="<? echo $valor_15 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_16" type="text" id="ref_16" value="<? echo $ref_16 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_16" type="text" id="quant_16" value="<? echo $quant_16 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_16" type="text" value="<? echo $prod_16 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_16" type="text" id="valor_16" value="<? echo $valor_16 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_17" type="text" id="ref_17" value="<? echo $ref_17 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_17" type="text" id="quant_17" value="<? echo $quant_17 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_17" type="text" value="<? echo $prod_17 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_17" type="text" id="valor_17" value="<? echo $valor_17 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_18" type="text" id="ref_18" value="<? echo $ref_18 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_18" type="text" id="quant_18" value="<? echo $quant_18 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_18" type="text" value="<? echo $prod_18 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_18" type="text" id="valor_18" value="<? echo $valor_18 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_19" type="text" id="ref_19" value="<? echo $ref_19 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_19" type="text" id="quant_19" value="<? echo $quant_19 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_19" type="text" value="<? echo $prod_19 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_19" type="text" id="valor_19" value="<? echo $valor_19 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_20" type="text" id="ref_20" value="<? echo $ref_20 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_20" type="text" id="quant_20" value="<? echo $quant_20 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_20" type="text" value="<? echo $prod_20 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_20" type="text" id="valor_20" value="<? echo $valor_20 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_21" type="text" id="ref_21" value="<? echo $ref_21 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_21" type="text" id="quant_21" value="<? echo $quant_21 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_21" type="text" value="<? echo $prod_21 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_21" type="text" id="valor_21" value="<? echo $valor_21 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_22" type="text" id="ref_22" value="<? echo $ref_22 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_22" type="text" id="quant_23" value="<? echo $quant_22 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_22" type="text" value="<? echo $prod_22 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_22" type="text" id="valor_22" value="<? echo $valor_22 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_23" type="text" id="ref_23" value="<? echo $ref_23 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_23" type="text" id="quant_24" value="<? echo $quant_23 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_23" type="text" value="<? echo $prod_23 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_23" type="text" id="valor_23" value="<? echo $valor_23 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_24" type="text" id="ref_24" value="<? echo $ref_24 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_24" type="text" id="quant_25" value="<? echo $quant_24 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_24" type="text" value="<? echo $prod_24 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_24" type="text" id="valor_24" value="<? echo $valor_24 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_25" type="text" id="ref_25" value="<? echo $ref_25 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_25" type="text" id="quant_26" value="<? echo $quant_25 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_25" type="text" value="<? echo $prod_25 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_25" type="text" id="valor_25" value="<? echo $valor_25 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_26" type="text" id="ref_26" value="<? echo $ref_26 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_26" type="text" id="quant_27" value="<? echo $quant_26 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_26" type="text" value="<? echo $prod_26 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_26" type="text" id="valor_26" value="<? echo $valor_26 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_27" type="text" id="ref_27" value="<? echo $ref_27 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_27" type="text" id="quant_28" value="<? echo $quant_27 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_27" type="text" value="<? echo $prod_27 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_27" type="text" id="valor_27" value="<? echo $valor_27 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_28" type="text" id="ref_28" value="<? echo $ref_28 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_28" type="text" id="quant_29" value="<? echo $quant_28 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_28" type="text" value="<? echo $prod_28 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_28" type="text" id="valor_28" value="<? echo $valor_28 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_29" type="text" id="ref_29" value="<? echo $ref_29 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_29" type="text" id="quant_30" value="<? echo $quant_29 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_29" type="text" value="<? echo $prod_29 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_29" type="text" id="valor_29" value="<? echo $valor_29 ?>" size="12">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ref_30" type="text" id="ref_30" value="<? echo $ref_30 ?>" size="4">
</div></td>
<td><div align="center">
<input name="quant_30" type="text" id="quant_31" value="<? echo $quant_30 ?>" size="3">
</div></td>
<td><div align="center">
<input name="prod_30" type="text" value="<? echo $prod_30 ?>" size="60">
</div></td>
<td><div align="center">
<input name="valor_30" type="text" id="valor_30" value="<? echo $valor_30 ?>" size="12">
</div></td>
</tr>
</table></td>
<td width="107" colspan="2" rowspan="3" bgcolor="#FFFFFF"><p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;
</font></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></p></td>
</tr>
<tr>
<td height="53" rowspan="2" bgcolor="#FFFFFF">&nbsp;</td>
<td width="163" rowspan="2" bgcolor="#FFFFFF">&nbsp;</td>
<td width="166" rowspan="2" bgcolor="#FFFFFF">&nbsp;</td>
<td width="58" bgcolor="#FFFFFF">Status:</td>
<td width="228" bgcolor="#FFFFFF"><select name="status" id="status">
<option><? echo $status ?></option>
<option>Enviado</option>
<option>Processando</option>
<option>Cancelado</option>
<option>Bloqueado</option>
<option>Aguardando confirma&ccedil;&atilde;o</option>
<option>Arquivado</option>
</select> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;
</font></td>
</tr>
<tr>
<td width="58" bgcolor="#FFFFFF">&nbsp;</td>
<td bgcolor="#FFFFFF"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<br>
<input name="Submit" type="submit" id="Submit4" value="Enviar pedido">
</font></td>
</tr>
</table>
</form>
</div>
</body>
</html>[/codebox]

Link para o comentário
Compartilhar em outros sites

  • 0
O disabled inive a transferência do dado do campo pelo formulário. Troque por readonly="true".

Talvez o erro de sintaxe seja por causa de uma aspa a mais aqui:

SET DP_nome ='$DP_nome''

Sempre poste a mensagem de erro. Isso nos ajuda a enocntrar error.

o erro de sintax resolvel agora deu outro =/

Unknonn colunn 'ref_1 in 'fild list'

Link para o comentário
Compartilhar em outros sites

  • 0
Guest Diego Mendes
A coluna ref_1 não foi encontrada. Verifique se o nome está correto.

pior que ta igual será que ta errado o php ?

Segue abaixo o sql que eu usei pra criar as tabelas ta aparenteemenmte certo

CREATE TABLE pedidos (
ID int(11) NOT NULL auto_increment,

DP_nome varchar(50) NOT NULL,

ref_1 varchar(50) NOT NULL,
ref_2 varchar(50) NOT NULL,
ref_3 varchar(50) NOT NULL,
ref_4 varchar(50) NOT NULL,
ref_5 varchar(50) NOT NULL,
ref_6 varchar(50) NOT NULL,
ref_7 varchar(50) NOT NULL,
ref_8 varchar(50) NOT NULL,
ref_9 varchar(50) NOT NULL,
ref_10 varchar(50) NOT NULL,
ref_11 varchar(50) NOT NULL,
ref_12 varchar(50) NOT NULL,
ref_13 varchar(50) NOT NULL,
ref_14 varchar(50) NOT NULL,
ref_15 varchar(50) NOT NULL,
ref_16 varchar(50) NOT NULL,
ref_17 varchar(50) NOT NULL,
ref_18 varchar(50) NOT NULL,
ref_19 varchar(50) NOT NULL,
ref_20 varchar(50) NOT NULL,
ref_21 varchar(50) NOT NULL,
ref_22 varchar(50) NOT NULL,
ref_23 varchar(50) NOT NULL,
ref_24 varchar(50) NOT NULL,
ref_25 varchar(50) NOT NULL,
ref_26 varchar(50) NOT NULL,
ref_27 varchar(50) NOT NULL,
ref_28 varchar(50) NOT NULL,
ref_29 varchar(50) NOT NULL,
ref_30 varchar(50) NOT NULL,

quant_1 varchar(50) NOT NULL,
quant_2 varchar(50) NOT NULL,
quant_3 varchar(50) NOT NULL,
quant_4 varchar(50) NOT NULL,
quant_5 varchar(50) NOT NULL,
quant_6 varchar(50) NOT NULL,
quant_7 varchar(50) NOT NULL,
quant_8 varchar(50) NOT NULL,
quant_9 varchar(50) NOT NULL,
quant_10 varchar(50) NOT NULL,
quant_11 varchar(50) NOT NULL,
quant_12 varchar(50) NOT NULL,
quant_13 varchar(50) NOT NULL,
quant_14 varchar(50) NOT NULL,
quant_15 varchar(50) NOT NULL,
quant_16 varchar(50) NOT NULL,
quant_17 varchar(50) NOT NULL,
quant_18 varchar(50) NOT NULL,
quant_19 varchar(50) NOT NULL,
quant_20 varchar(50) NOT NULL,
quant_21 varchar(50) NOT NULL,
quant_22 varchar(50) NOT NULL,
quant_23 varchar(50) NOT NULL,
quant_24 varchar(50) NOT NULL,
quant_25 varchar(50) NOT NULL,
quant_26 varchar(50) NOT NULL,
quant_27 varchar(50) NOT NULL,
quant_28 varchar(50) NOT NULL,
quant_29 varchar(50) NOT NULL,
quant_30 varchar(50) NOT NULL,

prod_1 varchar(50) NOT NULL,
prod_2 varchar(50) NOT NULL,
prod_3 varchar(50) NOT NULL,
prod_4 varchar(50) NOT NULL,
prod_5 varchar(50) NOT NULL,
prod_6 varchar(50) NOT NULL,
prod_7 varchar(50) NOT NULL,
prod_8 varchar(50) NOT NULL,
prod_9 varchar(50) NOT NULL,
prod_10 varchar(50) NOT NULL,
prod_11 varchar(50) NOT NULL,
prod_12 varchar(50) NOT NULL,
prod_13 varchar(50) NOT NULL,
prod_14 varchar(50) NOT NULL,
prod_15 varchar(50) NOT NULL,
prod_16 varchar(50) NOT NULL,
prod_17 varchar(50) NOT NULL,
prod_18 varchar(50) NOT NULL,
prod_19 varchar(50) NOT NULL,
prod_20 varchar(50) NOT NULL,
prod_21 varchar(50) NOT NULL,
prod_22 varchar(50) NOT NULL,
prod_23 varchar(50) NOT NULL,
prod_24 varchar(50) NOT NULL,
prod_25 varchar(50) NOT NULL,
prod_26 varchar(50) NOT NULL,
prod_27 varchar(50) NOT NULL,
prod_28 varchar(50) NOT NULL,
prod_29 varchar(50) NOT NULL,
prod_30 varchar(50) NOT NULL,

valor_1 varchar(50) NOT NULL,
valor_2 varchar(50) NOT NULL,
valor_3 varchar(50) NOT NULL,
valor_4 varchar(50) NOT NULL,
valor_5 varchar(50) NOT NULL,
valor_6 varchar(50) NOT NULL,
valor_7 varchar(50) NOT NULL,
valor_8 varchar(50) NOT NULL,
valor_9 varchar(50) NOT NULL,
valor_10 varchar(50) NOT NULL,
valor_11 varchar(50) NOT NULL,
valor_12 varchar(50) NOT NULL,
valor_13 varchar(50) NOT NULL,
valor_14 varchar(50) NOT NULL,
valor_15 varchar(50) NOT NULL,
valor_16 varchar(50) NOT NULL,
valor_17 varchar(50) NOT NULL,
valor_18 varchar(50) NOT NULL,
valor_19 varchar(50) NOT NULL,
valor_20 varchar(50) NOT NULL,
valor_21 varchar(50) NOT NULL,
valor_22 varchar(50) NOT NULL,
valor_23 varchar(50) NOT NULL,
valor_24 varchar(50) NOT NULL,
valor_25 varchar(50) NOT NULL,
valor_26 varchar(50) NOT NULL,
valor_27 varchar(50) NOT NULL,
valor_28 varchar(50) NOT NULL,
valor_29 varchar(50) NOT NULL,
valor_30 varchar(50) NOT NULL,

status varchar(50) NOT NULL,

previsao_de_entrega varchar(50) NOT NULL,

data varchar(50) NOT NULL,

PRIMARY KEY(ID));

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652k
×
×
  • Criar Novo...