• 0
Sign in to follow this  
Guest jederafa

Problemas Com Fetch

Question

Guest jederafa

<?php

require_once("conexao.php");

$codigo = $_GET["codigo"];

$sql = "SELECT * FROM $tb1 WHERE codigo =.$codigo;

$qry = mysql_query($sql);

if ($list = mysql_fetch_array($qry)) {

?>

<table width="620" border="0" cellspacing="0" cellpadding="0">

<tr>

<td valign="top"><form action="restrito.php" method="post" enctype="multipart/form-data" name="form1" id="form1">

<div align="left">

<p><br />

<strong><br />

Editar Filial</strong> <br />

<span class="style2">_________________________________________________________________<br />

</span><br />

Nome da Igreja:

<input name="igreja" type="text" id="igreja" value="<?php echo $list["igreja]; ?>" size="40" maxlength="255" />

<br />

<br />

Responsável:    

<input name="responsavel" type="text" id="responsavel" value="<?php echo $list["responsavel"]; ?>" size=40" maxlength="255" />

<br />

<br />

Endereço:         

<input name="endereco" type="text" id="endereco" value="<?php echo $list["endereco]; ?>" size="40" maxlength="255" />

<br />

<br />

Telefones:

       

<input name="telefone" type="text" id="telefone" value="<?php echo $list["telefone"]; ?>" size=40" maxlength="255" />

<span class="style1">Ex: [DDD] 7777-7777 / 8888-8888 </span></p>

<p>

<label>

                         

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

<input name="page" type="hidden" id="page" value="filiais_edit_process" />

<input name="s1" type="submit" id="s1" value="Submit" />

<input name="r1" type="reset" id="r1" value="Reset" />

</label>

<br />

<br />

<br /></p>

</div>

</form>

</td>

</tr>

</table>

<?php } ?>

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

$sql = "SELECT * FROM $tb1 WHERE codigo =".$codigo;

$tb1 vem da onde, se não tiver a tabela ele não vai funcionar..

de um

echo $sql;

para saber o que retorna esta variavel e veja se esta correto, tente colar o resultado do echo no phpmyadmin e veja se retorna os registros.

Share this post


Link to post
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.

Sign in to follow this