SHARE
TWEET

Untitled

a guest Oct 16th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5.  
  6.     <form method="POST" action="">
  7.    
  8.         A: <input type="text" name="zmienna_a"></br>
  9.         B: <input type="text" name="zmienna_b"></br>
  10.         <input type="submit" name="submit" value="Wyślij">
  11.        
  12.     </form>
  13.    
  14.     <?php
  15.        
  16.         if(isSet($_POST['zmienna_a']) && isSet($_POST['submit']))
  17.         {
  18.             $zmienna_a = $_POST['zmienna_a'];
  19.             $zmienna_b = $_POST['zmienna_b'];
  20.            
  21.            
  22.             if($zmienna_b>$zmienna_a)
  23.             {
  24.                 for($n=$zmienna_a;$n<=$zmienna_b;$n++)
  25.                 {
  26.                     echo $n.", ";
  27.                 }
  28.             }
  29.             else
  30.             {
  31.                 echo "Zmienna A jest większa od zmiennej B";
  32.             }
  33.         }
  34.        
  35.     ?>
  36. </body>
  37. </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