Advertisement
Aniket_Goku

swap

Jun 14th, 2021
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 KB | None | 0 0
  1. <?php
  2.     $no1=0;
  3.     $no2=0;
  4.     if(isset($_GET['sub']))
  5.     {
  6.        
  7.         $no1=$_GET['no1'];
  8.         $no2=$_GET['no2'];
  9.     }
  10.     ?>
  11. <html>
  12.     <style>
  13.         body
  14.         {
  15.             background-image:url('backgrounds/28.jpg');
  16.             background-size:100% 100%;
  17.             background-attachment:fixed;
  18.             backdrop-filter:blur(3px);
  19.             background-repeat:no-repeat;
  20.             margin:0;padding:0;height:150%;
  21.        
  22.         }
  23.         h1
  24.         {
  25.             background-color:black;
  26.             color:white;
  27.             font-family:supernatural knight;
  28.             font-size:50px;
  29.             text-align:center; 
  30.            
  31.         }
  32.         .l
  33.         {
  34.             background-color:black;
  35.             color:white;
  36.             width:100%;
  37.             font-size:30px;
  38.             text-align:center; 
  39.            
  40.         }
  41.     </style>
  42.     <body>
  43.         <h1>TASK - 6</h1>
  44.         <br><br><br>
  45.        
  46.         <br><br><br><br>
  47.         <form >
  48.             <table align="center" cellspacing="20" width="40%">
  49.                 <tr>
  50.                     <td>
  51.                         <label class="l">No 1</label>
  52.                     </td>
  53.                     <td>
  54.                         <input type="text" name="no1" placeholder="Enter no" class="l"
  55.                         value="<?php echo $no2;?>">
  56.                              
  57.                     </td>
  58.                 </tr>
  59.                 <tr>
  60.                     <td colspan="2" align="center">
  61.                         <input type="submit" class="l" value="&#8639 swap &#8642" name="sub">
  62.                     </td>
  63.                 </tr>
  64.                
  65.                 <tr>
  66.                     <td>
  67.                         <label class="l">No 2</label>
  68.                     </td>
  69.                     <td>
  70.                         <input type="text" name="no2" placeholder="Enter no" class="l"
  71.                         value="<?php echo $no1;?>">
  72.                        
  73.                     </td>
  74.                 </tr>
  75.             </table>
  76.         </form>
  77.     </body>
  78. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement