Advertisement
ph4x35ccb

Formulário ($_POST $_GET)

Mar 10th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.80 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title></title>
  5. </head>
  6. <body>
  7. <form action="post.php" method="POST">
  8.     <fieldset>
  9.         <legend>Formulario HTML</legend>
  10.         <p>
  11.             <label for="nome">Nome: </label>
  12.             <input type="text" name="nome" id="nome">
  13.         </p>
  14.         <p>
  15.             <label for="email">E-mail</label>
  16.             <input type="text" name="email" id="email">
  17.         </p>
  18.     </fieldset>
  19.         <p>
  20.             <input type="submit" value="Enviar" id="enviar">
  21.         </p>
  22. </form>
  23. </body>
  24. </html>
  25. Arquivo na onde enviado os dados get.php post.php
  26. <h1>Kjnetsecuryt - Metodo GET</h1>
  27. <?php
  28. echo 'Nome: ' . ($_GET['nome'] ?: '')."<br>";
  29. echo 'E-mail: ' . ($_GET['email'] ?: '')."<br>";
  30. ?>
  31. <h1>Kjnetsecuryt - Metodo POST</h1>
  32. <?php
  33. echo 'Nome: ' . ($_POST['nome'] ?: '')."<br>";
  34. echo 'E-mail: ' . ($_POST['email'] ?: '')."<br>";
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement