Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.7 kB
2
Indexable
Never
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>b</title>
</head>

<body>
    <?php
    if (isset($_POST['day'])) {

        $q = $_POST['day'];
        if ($q == "monday") {
            echo "Laugh on Monday, laugh for danger.";
        } else if ($q == "tuesday") {
            echo "Laugh on Tuesday, kiss a stranger.";
        } else if ($q == "wednesday") {
            echo "Laugh on Wednesday, laugh for a letter.";
        } else if ($q == "thursday") {
            echo "Laugh on Thursday, something better.";
        } else if ($q == "friday") {
            echo "Laugh on Friday, laugh for sorrow.";
        } else if ($q == "saturday") {
            echo "Laugh on Saturday, joy tomorrow.";
        } else {
            echo "invalid input!";
        }
    ?>
    <a href="c.php"><button>Go</button></a>

    <?php
    } else {
    ?>

    <form method="post">
        <label>choose a day</label>
        <select name="day">
            <option disabled selected>choose</option>
            <option value="monday">Monday</option>
            <option value="tuesday">Tuesday</option>
            <option value="wednesday">Wednesday</option>
            <option value="thursday">Thursday</option>
            <option value="friday">Friday</option>
            <option value="saturday">Saturday</option>
            <option value="sunday">Sunday</option>
        </select>
        <button type="submit">Go</button>
    </form>

    <?php } ?>
</body>

</html>