Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $month = strtolower($_POST['month']);
- switch ($month)
- {
- case "january":
- echo "<h2>There are <strong>31 Days</strong> in January</h2>";
- break;
- case "february":
- echo "<h2>There are <strong>28 Days</strong> in February</h2>";
- break;
- case "march":
- echo "<h2>There are <strong>31 Days</strong> in March</h2>";
- break;
- case "april":
- echo "<h2>There are <strong>30 Days</strong> in April</h2>";
- break;
- case "may":
- echo "<h2>There are <strong>31 Days</strong> in May</h2>";
- break;
- case "june":
- echo "<h2>There are <strong>30 Days</strong> in June</h2>";
- break;
- case "july":
- echo "<h2>There are <strong>31 Days</strong> in July</h2>";
- break;
- case "august":
- echo "<h2>There are <strong>30 Days</strong> in August</h2>";
- break;
- case "september":
- echo "<h2>There are <strong>31 Days</strong> in September</h2>";
- break;
- case "october":
- echo "<h2>There are <strong>30 Days</strong> in October</h2>";
- break;
- case "november":
- echo "<h2>There are <strong>31 Days</strong> in November</h2>";
- break;
- case "december":
- echo "<h2>There are <strong>30 Days</strong> in December</h2>";
- break;
- case "jaunary":
- case "jarnauy":
- case "janary":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="January" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>January</strong>?</a></h4>
- </form>';
- break;
- case "febuary":
- case "feburary":
- case "febarary":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="February" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>February</strong>?</a></h4>
- </form>';
- break;
- case "marh":
- case "marc":
- case "mrch":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="March" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>March</strong>?</a></h4>
- </form>';
- break;
- case "abril":
- case "aprl":
- case "apral":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="April" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>April</strong>?</a></h4>
- </form>';
- break;
- case "mahy":
- case "my":
- case "ay":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="May" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>May</strong>?</a></h4>
- </form>';
- break;
- case "juno":
- case "jun":
- case "joon":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="June" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>June</strong>?</a></h4>
- </form>';
- break;
- case "jul":
- case "julie":
- case "jly":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="July" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>July</strong>?</a></h4>
- </form>';
- break;
- case "agust":
- case "augst":
- case "augist":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="August" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>August</strong>?</a></h4>
- </form>';
- break;
- case "septembr":
- case "septimber":
- case "siptember":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="September" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>September</strong>?</a></h4>
- </form>';
- break;
- case "oktober":
- case "ahtober":
- case "octobr":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="October" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>October</strong>?</a></h4>
- </form>';
- break;
- case "novamber":
- case "novembir":
- case "novembr":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="November" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>November</strong>?</a></h4>
- </form>';
- break;
- case "decenber":
- case "dicember":
- case "decembr":
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>
- <form method="post" id="monthForm">
- <input type="hidden" name="month" value="December" />
- <h4><a onclick="document.forms[\'monthForm\'].submit();">Did you mean <strong>December</strong>?</a></h4>
- </form>';
- break;
- default:
- echo '<h2>"'.$_POST['month'].'" is not a valid month.</h2>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement