Olá galera, Sou inciciante em PHP e não estou conseguindo resolver este problema....eu criei uma página de busca de dados e gostaria de alterar ou excluir os dados do banco mysql...tudo parece estar certo (nenhum erro é anunciado quando rodo as páginas, mas nada está alterando ou deletando....alguém se habilitaria a me ajudar? Desde já agradeço.... configadm.php <?php $db = mysql_connect("localhost","root",""); $dado = mysql_select_db("login",$db); ?> exibe_dados.php ... </head> <body> <p align="center" class="style8">Testando</p> <div align="center"> <table width="1085" border="1" bgcolor="#E8E8E8"> <tr> <td colspan="6"><div align="center" class="style1">Dados completos <span class="style7">(ordem descendente de pontuação)</span></div></td> </tr> <tr> <td width="61"><div align="center" class="style6"><strong>Id</strong></div></td> <td width="126"><div align="center" class="style6"><strong>Pontuação total</strong></div></td> <td width="310"><div align="center" class="style6"><strong>Nome</strong></div></td> <td width="428"><div align="center" class="style6"><strong>Dados gerais</strong></div></td> <td width="60"><center> <div align="center" class="style6"><strong>Editar</strong></div> </center></td> <td width="60"><div align="center" class="style6"><strong>Excluir</strong></div></td> </tr> <?php include "configadm.php"; $sql_usuario = mysql_query("SELECT * FROM dados ORDER BY total DESC"); while($linha = mysql_fetch_array($sql_usuario)){ $id = $linha['id']; $total = $linha['total']; $usuario = $linha['usuario']; $dados_gerais = $linha['dados_gerais']; ?> <tr> <td align=center"><?php echo $id; ?></td> <td align="center"><?php echo $total; ?></td> <td align="center"><?php echo $usuario; ?></td> <td align="center"><?php echo $dados_gerais; ?></td> <td align="center"><a href="exibir_dados.php?acao=editar&id=<?php echo $id; ?>">Editar</a></td> <td align="center"><a href="exibir_dados.php?acao=excluir&id=<?php echo $id; ?>">Excluir</a></td> </tr> <?php } ?> </table> <br/> <hr/> <br/> <?php if($_GET['acao] == "editar"){ $id = $_GET['id']; $sql_update = mysql_query("SELECT * FROM dados WHERE id= '$id'"); while($linha = mysql_fetch_array($sql_update)){ $total = $linha['total']; $usuario = $linha['usuario']; $dados_gerais = $linha['dados_gerais']; } ?> <p align=center" class="style8"><font color="#FF0000">ATUALIZAR DADOS DO USUÁRIO</font></p> <form id="form3" name="form3" method="post" action="funcao.php?acao=editar&id=<?php echo $id; ?>"> <table width="1010" border="0" cellspacing="3"> <tr bgcolor="#CCCCCC"> <td width="270" align="center" bgcolor="#999999" class="style1"><font color="#000000"><strong>Total</strong></font></td> <td width="78" align="center" bgcolor="#999999" class="style1"><font color="#000000"><strong>Nome</strong></font></td> <td width="644" align="center" bgcolor="#999999" class="style1"><font color="#000000"><strong>Dados gerais</strong></font></td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999"><input type="text" name="total" id="total" value="<?php echo $total; ?>" size="12" maxlength="14" /></td> <td align="center" valign="top" bgcolor="#999999"><input type="text" name="usuario" id="usuario" value="<?php echo $usuario; ?>" size="45" maxlength="80" /></td> <td align="center" bgcolor="#999999"><textarea id="dados_gerais" name="dados_gerais" cols="105" rows="15" value="dados_gerais"><?php echo $dados_gerais; ?></textarea></td> </tr> <tr> <td align="center" bgcolor="#999999"> </td> <td align="center" bgcolor="#999999"> </td> <td align="center" bgcolor="#999999"><input type="submit" name="atualizar" id="atualizar" value="Atualizar" /></td> </tr> </table> </form> <?php } ?> <?php if($_GET['acao] == "excluir"){ $id = $_GET['id']; $sql_delete = mysql_query("SELECT * FROM dados WHERE id= '$id'"); while($linha = mysql_fetch_array($sql_delete)){ $total = $linha['total']; $usuario = $linha['usuario']; $dados_gerais = $linha['dados_gerais']; } ?> <p align=center" class="style8"><font color="#FF0000">EXCLUIR DADOS DO USUÁRIO</font></p> <form id="form3" name="form3" method="post" action="funcao.php?acao=excluir&id=<?php echo $id; ?>"> <table width="1010" border="0" cellspacing="3"> <tr bgcolor="#CCCCCC"> <td width="270" align="center" bgcolor="#999999" class="style1"><font color="#000000"><strong>Total</strong></font></td> <td width="78" align="center" bgcolor="#999999" class="style1"><font color="#000000"><strong>Nome</strong></font></td> <td width="644" align="center" bgcolor="#999999" class="style1"><font color="#000000"><strong>Dados gerais</strong></font></td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999"><input type="text" name="total" id="total" value="<?php echo $total; ?>" size="12" maxlength="14" /></td> <td align="center" valign="top" bgcolor="#999999"><input type="text" name="usuario" id="usuario" value="<?php echo $usuario; ?>" size="45" maxlength="80" /></td> <td align="center" bgcolor="#999999"><textarea id="dados_gerais" name="dados_gerais" cols="105" rows="15" value="dados_gerais"><?php echo $dados_gerais; ?></textarea></td> </tr> <tr> <td align="center" bgcolor="#999999"> </td> <td align="center" bgcolor="#999999"> </td> <td align="center" bgcolor="#999999"><input type="submit" name="excluir" id="excluir" value="Excluir" /></td> </tr> </table> </form> <?php } ?> </div> </body> </html> funcao.php <?php include "configadm.php"; $usuario = $_POST['usuario]; $total = $_POST['total']; $dados_gerais = $_POST['dados_gerais']; if($_GET['acao'] == "editar") { $id = $_GET['$id']; $sql_update = mysql_query("UPDATE dados SET usuario = '$usuario', total = '$total', dados_gerais = '$dados_gerais' WHERE id= '$id'"); header("location: exibir_dados.php"); } if($_GET['acao'] == "excluir") { $id = $_GET['$id']; $sql_update = mysql_query("DELETE FROM dados WHERE id= '$id'"); header("location: exibir_dados.php"); } ?>