0

Hi,
I am retrieving the below values from the table and use the values in drop down box in php,i don't want to retrieve "All" value from the table,i tried with except keyword queries, but i din't got the value,please help me out

01 Dean
02 HOD
03 Students
04 Chairman
06 Prof.
07 Admin
08 All
09 Faculty


Regards,
Vidhya

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by vidhyaponnusamy
0

how are you displaying your dropdown box?

I use this function for dropdowns.

function createLocation($frm,$current) {
		echo '<select name="'.$frm.'" id="'.$frm.'">';
    	$area = new area();
    	$arealist = $area->GetList(array(array("areaid",">",0)));
    	foreach($arealist as $area)
    	{
			if ($current == $area->areaId){
				echo '<option SELECTED value="'.$area->areaId.'">'.$area->areaname." : ".$area->county." : ".$area->town.'</option>'; 
			}
			else
			{
				echo '<option value="'.$area->areaId.'">'.$area->areaname." : ".$area->county." : ".$area->town.'</option>'; 
			}
		}

		echo '</select>';
	}

though this is OO code you can alter it to use with a fetch statement in PHP. Then just add in an IF statement to catch the ALL record.

If you are still having problems send me your code and I will sort it out for you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.