Hi,I am using below code.
For particular category,i made different pages like human.php,sales.php
is there any other method for doing that in more efficient way.
<div style="background-image:url('image/top.png');height:15px;width:975px;"></div>
<div style="background-image:url('image/mid.png');background-repeat:repeat-y;">
<table align="center" cellpadding="0" cellspacing="0" width="1024">
<tr>
<td style="width:200px; vertical-align:top;">
<div style="padding-left:15px;">
<ul id="css3menu" style="//width:165px;">
<li class="topfirst"><a href="management.php?category=General Management" title="General Management">General Management</a></li>
<li class="topitem"><a href="human.php?category=Human Resources" title="Human Resources">Human Resources</a></li>
<li class="topitem"><a href="finance.php?category=Finance" title="Finance">Finance</a></li>
<li class="topitem"><a href="front.php?category=Front Office" title="Front Office">Front Office</a></li>
<li class="topitem"><a href="house.php?category=House Keeping" title="House Keeping">House Keeping</a></li>
<li class="topitem"><a href="engineering.php?category=Engineering" title="Engineering">Engineering</a></li>
<li class="topitem"><a href="production.php?category=B Production" title="F and B Production">F & B Production</a></li>
<li class="topitem"><a href="services.php?category=F & B Services" title="F and B Services ">F & B Services </a></li>
<li class="topitem"><a href="sales.php?category=Sales & Marketing" title="Sales and Marketing ">Sales & Marketing </a></li>
<li class="toplast"><a href="aviation.php?category=Aviation Jobs" title="Aviation Jobs">Aviation Jobs</a></li>
</ul>
</div>
<?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="ihm"; // Database name
$tbl_name="register"; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect server ");
mysql_select_db("$db_name")or die("cannot select DB");
if(isset($_REQUEST['category']))
{
if($_REQUEST['category']=="General Management")
$result = mysql_query("SELECT * FROM $tbl_name where category='General Management' ");
elseif($_REQUEST['category']=="Human Resources")
$result = mysql_query("SELECT * FROM $tbl_name where category='Human Resources'");
elseif($_REQUEST['category']=="Finance")
$result = mysql_query("SELECT * FROM $tbl_name where category='Finance'");
elseif($_REQUEST['category']=="Human Resources")
$result = mysql_query("SELECT * FROM $tbl_name where category='Human Resources'");
elseif($_REQUEST['category']=="Front Office")
$result = mysql_query("SELECT * FROM $tbl_name where category='Front Office'");
elseif($_REQUEST['category']=="House Keeping")
$result = mysql_query("SELECT * FROM $tbl_name where category='House Keeping'");
elseif($_REQUEST['category']=="Engineering")
$result = mysql_query("SELECT * FROM $tbl_name where category='Engineering'");
elseif($_REQUEST['category']=="F & B Services")
$result = mysql_query("SELECT * FROM $tbl_name where category='F & B Services'");
elseif($_REQUEST['category']=="F & B Production")
$result = mysql_query("SELECT * FROM $tbl_name where category='F & B Production'");
elseif($_REQUEST['category']=="Human Resources")
$result = mysql_query("SELECT * FROM $tbl_name where category='Human Resources'");
elseif($_REQUEST['category']=="Sales & Marketing")
$result = mysql_query("SELECT * FROM $tbl_name where category='Sales & Marketing'");
else
$result = mysql_query("SELECT * FROM $tbl_name where category='Aviation Jobs'");
while($row = mysql_fetch_array($result))
{
}
}
?>