HTML Inputs


Input Type = CHECKBOX



Input Type = COLOR



Input Type = DATE



Input Type = DATETIME



Input Type = DATETIME-LOCAL



Input Type = EMAIL



Input Type = FILE



Input Type = HIDDEN



Input Type = MONTH



Input Type = NUMBER



Input Type = PASSWORD



Input Type = RADIO



Input Type = RANGE



Input Type = RESET



Input Type = SEARCH



Input Type = TEL



Input Type = TEXT



Input Type = TIME



Input Type = WEEK



Input Type = URL



Input Type = SUBMIT



The code used for index.php is below:


<!DOCTYPE html>
<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">
    <link rel="stylesheet" href="../styles.css">
    <title>HTML: Inputs</title>
</head>
<body>

<h2 style="background-color: yellow;">HTML Inputs</h2>

<?php

// Leaving out the input type image
$inputs = ["checkbox", "color", "date", "datetime", "datetime-local",
         "email", "file", "hidden", "month", "number", "password",
         "radio", "range", "reset", "search", "tel",
         "text", "time", "week", "url", "submit" 
];

echo "<form action='index.php' method='POST'>";
foreach($inputs as $input){

    $upper = strtoupper($input);
    echo "<hr>";
    echo "<h3>Input Type = <span style='background-color: lightgreen'>". $upper ."</span></h3>";
    echo "<input type='$input' name='$input' id='$input' placeholder='$upper'>";
    echo "<br>";
} 

    echo "</form>";
    include('../show_code.php');
    show_code('index.php');
?>

</body>
</html>