0

Hi,

How to create a dynamic drop down list using php. My drop down list should be:

Example:
if manager logins : the manager should see only the manager list of a company.
if employee logins: the employee should see only the employee list of a company.

Please help me out....

5
Contributors
6
Replies
27
Views
6 Years
Discussion Span
Last Post by tapananand
0

Below is not a complete code,it is just a logic.
Try to implement at your end.

<select name="dropd" id="dropd">
<option value=""> - - Select - -</option>
<? 
if(manager is logged in)
{
	$res = select manager list from database
	while($rs = mysql_fetch_assoc($res))
	{
?>
	<option value="<?=$rs['manager-id']?>"><?=$rs['manager-name']?></option>
<?
	}
}
if(employee is logged in)
{
	$res = select employee list from database
	while($rs = mysql_fetch_assoc($res))
	{
?>
	<option value="<?=$rs['employee-id']?>"><?=$rs['employee-name']?></option>
<?
	}
}
?>
</select>
0

hi folks .. im new to daniweb and i like to learn more bout php .. since im preparing for my thesis in the future please do help me code just a simple horizontal menu (not a hyperlink) and when you navigate or point your cursor in that menu, the submenus will automatically revealed and is vertically presented .. please do help me .. Godbless

This question has already been answered. 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.