rezamalik15

PHP HTML - Light Color Detector - Exercise

Jun 10th, 2023
1,557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <?php
  2.  
  3. $light = "blue";
  4.  
  5. ?>
  6.  
  7. <html lang="en">
  8. <head>
  9.     <title>Light Color Detector</title>
  10.     <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
  11. </head>
  12. <body>
  13.  
  14. <div class="container">
  15.    
  16.     <h1>Light Color Detector</h1>
  17.  
  18.     <?php if($light == "red"):?>
  19.  
  20.  
  21.  
  22.     <?php elseif($light == "green"):?>
  23.  
  24.        
  25.  
  26.     <?php elseif($light == "blue"):?>
  27.  
  28.  
  29.  
  30.     <?php else:?>
  31.  
  32.  
  33.  
  34.     <?php endif;?>
  35.  
  36. </div>
  37.  
  38. <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
  39. </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment