OLA PESSOAL nao consigo editar um banco de dados a partir do id, primeiro que o transporte da variavel nao esta indo o id correto, preciso pegar a variavel e exibir para edicao somente a linha expecifica
LISTAR.PHP
<?php include("conexao.php"); ?>
<?php
//Selecionar todos os produtos da tabela
$result_produtos = "SELECT * FROM intranetacontece ORDER BY id DESC";
$resultado = mysqli_query($mysqli, $result_produtos);
?>
<!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=utf-8" />
<title>Metalsystem</title>
<link href="java/css/bootstrap.min.css" rel="stylesheet">
<script src="java/js/jquery.js"></script>
<script src="java/js/bootstrap.min.js"></script>
</head>
<body>
<table width="822" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="818" height="95">
<form id="form1" name="form1" method="post" action="02acontece_editar.php">
<?php while($row = mysqli_fetch_array($resultado)){
$id = $row['id'];
$foto = $row['foto'];
$descricao = $row['descricao'];
?>
<table width="803" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="87" height="59"><?php echo $id ?>
<input name="id_acontece" type="hidden" id="id_acontece" value="<?php echo $id ?>" /></td>
<td width="193"><?php echo $foto ?></td>
<td width="161" align="left"><?php echo $descricao ?></td>
<td width="288"><img src="../img/<?php echo $row['foto'];?>.jpg" alt="..." width="49" height="57" /></td>
<td width="62"><input type="submit" name="button" id="button" value="editar" /></td>
<td width="62"><input type="submit" name="button2" id="button2" value="excluir" /></td>
<td width="62"> </td>
</tr>
</table>
<?php } ?>
</form>
</td>
</tr>
</table>
</body>
</html>