Hello Everyone, I created a form so that users can select date range. Based on the date range later on it would show a graph. I am still in the first part trying to get the value selected by the user so I can generate the query from the database. How can I get those selected values?
See my code below:
<html>
<head>
<title>Months List</title>
</head>
<?php
$list = ARRAY('January','February','March','April', 'May', 'June', 'July', 'August', 'September', 'October','November', 'December');
$list2 = ARRAY('January','February','March','April', 'May', 'June', 'July', 'August', 'September', 'October','November', 'December');
?>
<body bgcolor ="lightblue">
<form id="form1" name="form1" method="post" action="">
<select id ="str" Name="Words">
<option value="">--- Start Date ---</option>;
<?php
FOREACH($list AS $word){
echo '<option value="'.$word.'">'.$word.'</option>';}
?>
</select>
<input type="submit" name="Submit" value="Select" />
</form>
<form id="form2" name="form2" method="post" action="">
<select id="str2" Name="Words2">
<option value="">--- End Date ---</option>;
<?php
FOREACH($list2 AS $word){
echo '<option value="'.$word.'">'.$word.'</option>';}
?>
</select>
<input type="submit" name="Submit" value="Select" />
</form>
</body>
</html>