Advertisement
fcamuso

Corso recupero PHP lezione 9

May 9th, 2023 (edited)
1,016
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.27 KB | None | 0 0
  1. *** PAGINA HTML *** (A SEGUIRE LA PAGINA PHP)
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5.   <meta charset="UTF-8">
  6.   <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8.   <title>Document</title>
  9. </head>
  10. <body>
  11.  
  12.  
  13.   <form action="eform1.php" method="get">
  14.      
  15.      <!-- controlli per raccogliere i dati -->
  16.      <label for="user">User Name</label><br>
  17.      <input type="text" name="user" id="user"> <br><br>
  18.      
  19.      <label for="password">Password</label><br>
  20.      <input type="password" name="password" id="password"><br><br>
  21.      
  22.      <!-- bottone di submit -->
  23.      <input type="submit" name="bottone" id="invia" value="INVIA">
  24.  
  25.   </form>
  26.  
  27.  
  28. </body>
  29. </html>
  30.  
  31. *** PAGINA PHP ***
  32. <!DOCTYPE html>
  33. <html lang="en">
  34. <head>
  35.   <meta charset="UTF-8">
  36.   <meta http-equiv="X-UA-Compatible" content="IE=edge">
  37.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  38.   <title>Document</title>
  39. </head>
  40. <body>
  41.   <?php
  42.    $user = $_GET["user"];
  43.    $password = $_GET["password"];
  44.    
  45.    //facciamo finta di aver effettuato controlli
  46.    //e 'sanificato' i dati ricevuti
  47.    echo "Ho ricevuto come user name: $user e come password: $password<br>";
  48.     ?>
  49. </body>
  50. </html>
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement