Guest User

Untitled

a guest
Jan 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2.  
  3. include("conectar.php");
  4.  
  5. $id = $_GET['id'];
  6.  
  7. $sql = "SELECT * FROM departamento WHERE id='$id'";
  8. $resultado = mysql_query($sql) or die(mysql_error());
  9.  
  10. while($linha=mysql_fetch_array($resultado))
  11. {
  12. $nome = $linha["nome"];
  13. $id = $linha["id"];
  14.  
  15. echo "<form action = 'update.php?id='$id'' name = 'form' method = 'get'>";
  16. echo "Nome:<br>";
  17. echo "<input type='text' name='nome' value='$nome' maxlenght='100' size='25' /><br>";
  18. echo "<input type = 'submit' value = 'Editar' />";
  19. echo "</form>";
  20.  
  21. }
  22. ?>
Add Comment
Please, Sign In to add comment