Jump to content
Fórum Script Brasil
  • 0

(Resolvido) Erro SQL


dedas

Question

2 answers to this question

Recommended Posts

  • 0

<div align="center">

<table cellpadding="5" cellspacing="5">

<form action="acao/cidade.php?acao=editar" method="post">

<?php

//PEGA VARIAVEL URL

require 'classe/cidade.php';

$classe = new cidade_classe;

$classe->codigo = $_GET['codigo'];

$funcao = $classe->editar();

//CLASSE

?>

<tr>

<td colspan=2"><h1>Altera&ccedil;&atilde;o</h1></td>

</tr>

<tr>

<td>Nome</td>

<td>

<input type="text" name="cid_nome_form" value="<?php echo $funcao["nome]; ?>" maxlength="15" />

<input type="hidden" name="cid_codigo_form" value="<?php echo $funcao["codigo"]; ?>" />

</td>

</tr>

<tr>

<td>UF</td>

<td><input type=text" name="cid_uf_form" value="<?php echo $funcao["uf] ?>" maxlength="2" /></td>

</tr>

<tr>

<td><input type="submit" value="alterar" /></td>

</tr>

</form>

</table>

</div><!-- #div -->

eu descobri o que era =]

eu estava colocando o $classe->codigo = $_GET['codigo']; embaixo do $funcao = $classe->editar();, ai ele tava executando a parte do sql sem ter o id.Foi so colocar o $classe->codigo pra cima que deu tudo certo =]

Obrigado mais uma vez =D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...