Problem is not clearly stated.
urtrivedi
Posting Virtuoso
1,714 posts since Dec 2008
Reputation Points: 299
Solved Threads: 362
Skill Endorsements: 24
I guess you want search records based on some selected value in dropdown
conventional post/get method
1) you create html page as u did tried in ur first post with form elements
2) on submit form, all form elements posted to action page
http://www.w3schools.com/php/php_post.asp
3) set action page to say process.php
4) in process.php, you use posted form parameters to filter you sql result
5) display filter result
http://www.w3schools.com/php/php_mysql_where.asp
now a days jquery is used to fetch result from server and display in part of page without submiting whole page, but you learn above method first.
urtrivedi
Posting Virtuoso
1,714 posts since Dec 2008
Reputation Points: 299
Solved Threads: 362
Skill Endorsements: 24
Firstly, actioning a form will take you to the form you specified... process.php
You need to get values selected from a select (drop down) to load the next scenario, right?
Try the following -
<select name="Friday2" id="Friday" onchange="this.form.submit();">
<select name="Friday2" id="Friday">
<option value="0">Block # - Day - Time</option>
<option value="100">Block 100 - Fri 7:15-7:30</option>
<option value="200">Block 200 - Fri 7:30-7:45</option>
<option value="0">Block # - Day - Time</option>
<option value="<?php
if($_SERVER['REQUEST_METHOD'] == "POST") {
//Once a selection has been made, the posted value will be shown...
echo $Friday; //Assuming that you have code to capture the value...
?>"
<?php
if($Friday == $Friday) {
echo "SELECTED";
}
?>>
<?php
echo $Friday;
}
?>
</option>
<option value="2100">Block 2100 - Sat 7:15-7:30</option>
<option value="2200">Block 2200 - Sat 7:30-7:45</option>
</Select>
To get the values across to your process.php form, add hidden text boxes to save the values in your first form -
<input type="hidden" name="hiddenfriday" value="<?=$_POST['Friday2'];?>"/>
In process.php -
$Friday2 = $_POST['Friday2'];
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
It was a pleasure, Please mark as solved, thanx.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20