Hi Bogu,
I apologise for being vague. I would like to have a startup page that displays 6 categories. (Sector, Sub-Sector, Donor, Oblast, District, Jamoat) as dropdown lists. The user should the be able to select from one or more of the categories, including more than item in each category. For example a user may select under the "Sector" category -> Health, Education and Water, Under "Donor" Category -> USAID, CIDA and Japan Aid etc. The user then selects checkboxes representing fields (For example a checkbox to show, Sector Name, Donor Name, Beneficiaries etc.
After the user has selected the sectors and the fields s/he wants to view, the "search" button is clicked and the request is sent to .php file that contains SQl statements that execute according to the chosen parameters.
I have so far been able to show the "Sector" category as a dropdown list, but i would like to show all categories on one page and then have an SQl statement executed when a selection is made showing the chosen fields with the data filtered according to the search. I guess this involves the use of multiple arrays to store the selection(s) from each category and then assign them to a variable that can be accessed from another .php document.
I hope I have made myself clear this time.
Thanks again for taking an interest in helping me.
Best regards,
Irshad
<?php
$db = mysql_connect("localhost","root");
mysql_select_db("CP_PROJECT",$db);
$result = mysql_query("select Project_Sector_ID, Project_Sector from Project_sector_List");
if ($result)
{
echo "<SELECT NAME='Project_Sector' size ='10' multiple>";
while ($myrow = mysql_fetch_array($result))
{
echo "<OPTION VALUE=\"".$myrow["Project_Sector_List.Project_Sector_ID"]."\">".
$myrow["Project_Sector"]." </OPTION> ";
}
echo "</SELECT>";
}
?>