Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="UTF-8">
- <title></title>
- <form method='post' action="zad_33.php"></form>
- </head>
- <body style="background-color: antiquewhite">
- <?php include ("zad_33.php"); ?>
- <h1 style="text-decoration:underline", style="text-align:cener"><i><b><p style='color: blue'>Pleas enter your information:</p></b></i></h1>
- <p style='color: darkslateblue'> <i> City:</p><input type="text" name="city"></i>
- <p style='color: darkslateblue'> <i> Month:</p><input type="text" name="month"></i>
- <p style='color: darkslateblue'> <i> Year:</p><input type="text" name="year"></i>
- <?php // $inputLocal = array (city,) ?>
- <br><br>
- <p style="color: crimson ">
- Pleas choose the kinds of weather you experienced from the list below.<br>
- Choose all that apply.<br></p>
- <?php
- $weather = array("Sunchine", "Clouds", "Rain", "Hail", "Sleet","Snow","Wind","Cold","Heat");
- ?>
- <input type="checkbox" name="weather[]" value="sunshine" />Sunshine<br />
- <input type="checkbox" name="weather[]" value="Clouds" />Clouds<br />
- <input type="checkbox" name="weather[]" value="Rain" />Rain<br />
- <input type="checkbox" name="weather[]" value="Hail" />Hail<br />
- <input type="checkbox" name="weather[]" value="Sleet" />Sleet<br />
- <input type="checkbox" name="weather[]" value="Snow" />Snow<br />
- <input type="checkbox" name="weather[]" value="Wind" />Wind<br />
- <input type="checkbox" name="weather[]" value="Cold" />Cold<br />
- <input type="checkbox" name="weather[]" value="Heat" />Heat<br /><br>
- <input type="submit" value="Go" name="Go" />
- </body>
- </html>
- //---------------------------------------------------------------------------------
- <?php
- $inputLocal = array("city","month","year");
- if(isset($_POST['weather[]'])){
- if(isset($_POST['Go'])){
- if(isset($_POST['city'])&&isset($_POST['month'])&&isset($_POST['year'])){
- $city = $_POST['city'];
- $month = $_POST['month'];
- $year = $_POST['year'];
- echo "In".$inputLocal[0]." in the month of".$inputLocal[1].$inputLocal[2].", you observed the following weather:";
- }}
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment