How do I code this select statement?!
Well I have a select statement like this:
I think i need to do it like the following in order to make it work:
mysql_connect($db_host, $db_user, $db_pwd);
$department "SELECT department FROM authorize";
$sql = "select * from authorize";
$result = mysql_query($sql);
<form action="super.php" method="post">
$username = $row['username'];
$name = $row['firstname']." ".$row['lastname'];
echo "<option value=\"$username\">$name</option>";
<input type="submit" value="Submit" name="submit" />
Select department, department2, department3, department4, department5, department6 from table where username ="$_SESSION[username];
Select department from all users. If department is equal to department, department2, department3, department4, department5, department6 then show all users in select option list.