Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $light = "blue";
- ?>
- <html lang="en">
- <head>
- <title>Light Color Detector</title>
- <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
- </head>
- <body>
- <div class="container">
- <h1>Light Color Detector</h1>
- <?php if($light == "red"):?>
- <h2 class="text-danger">
- <?= "Light color is red"; ?>
- </h2>
- <?php elseif($light == "green"):?>
- <h2 class="text-success">
- <?= "Light color is green"; ?>
- </h2>
- <?php elseif($light == "blue"):?>
- <h2 class="text-primary">
- <?= "Light color is blue"; ?>
- </h2>
- <?php else:?>
- <h2 class="text-secondary">
- <?= "Light color is not detected"; ?>
- </h2>
- <?php endif;?>
- </div>
- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment