SHARE
TWEET

Untitled

phpist Oct 15th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="ru">
  3. <head>
  4.   <title>Гарантированный прием значений от флажков</title>
  5.   <meta charset='utf-8'>
  6. </head>
  7. <body>
  8.   <?php
  9.   if (isset($_REQUEST['doGo'])) {
  10.     foreach ($_REQUEST['known'] as $k => $v) {
  11.       if($v) echo "Вы знаете язык $k!<br>";
  12.       else echo "Вы не знаете языка $k. <br>";
  13.     }
  14.   }
  15.   ?>
  16.   <form action="<?=$_SERVER['SCRIPT_NAME']?>" method="post">
  17.     Какие языки программирования вы знаете?<br />
  18.     <input type="hidden" name="known[PHP]" value="0">
  19.     <input type="checkbox" name="known[PHP]" value="1">PHP<br />
  20.  
  21.     <input type="hidden" name="known[Perl]" value="0">
  22.     <input type="checkbox" name="known[Perl]" value="1">Perl<br />
  23.  
  24.     <input type="submit" name="doGo" value="Go!">
  25.   </form>
  26. </body>
  27. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top