• Language

    PHP

  • Description

    Month name

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Month name</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body>
<?php

if ($_SERVER['REQUEST_METHOD']=='POST')
{
    $month = intval ($_POST['month']);
    if($month==1)
        echo 'January<br>'
    if($month==2)
        echo 'February<br>'
    if($month==3)
        echo 'March<br>'
    if($month==4)
        echo 'April<br>'
    if($month==5)
        echo 'May<br>'
    if($month==6)
        echo 'June<br>'
    if($month==7)
        echo 'July<br>'
    if($month==8)
        echo 'August<br>'
    if($month==9)
        echo 'September<br>'
    if($month==10)
        echo 'October<br>'
    if($month==11)
        echo 'November<br>'
    if($month==12)
        echo 'December<br>'
}
 
?>
        <form method="post">
            <table style="text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="1" cellspacing="1">
                <tbody>
                    <tr>
                        <td>
                            <label for="month">Enter the value of month:</label>
                        </td>
                        <td>
                            <input name="month" required="required" step="1" type="number" />
                        </td>
                    </tr>
                    <tr align="center">
                        <td colspan="2" rowspan="1">
                            <input value="Process" type="submit" />
                        </td>
                    </tr>
                </tbody>
            </table>
        </form>
    </body>
</html>