Thanks swdev but i did the query as
Code:
SELECT *
FROM users
WHERE userid = 'ACCOUNTS\\\john.doe'
and it returned the john doe entry so now that i've got that working how do i get it so it populates a drop down list with all the users in a certain position
ie.
PHP Code:
<?php
function open_type(){
global $host,$user,$pass,$name,$position;
#Grab All Employees
$connect = mysql_connect("$host","$user","$pass") or die ("Could not connect");
mysql_select_db('halzilla') or die ("Cannot Select DB");
$query="SELECT * FROM users WHERE position='Manager'";
$result = mysql_query($query) or die("Query Failed");
while ($line = mysql_fetch_array($result)) {
$name=$line['fullname'];
$position=$line['position'];
$approvers_names.="<option>$name";
}
mysql_free_result($result);
mysql_close($connect);
?>
<html>
<head><title></title></head>
<body>
The approver is <?php echo("$name and their position is $position")?>
<select name="completed_by"><option>Select Name<?php echo "$approvers_name" ?></select>
</body>
</html>
<?php
}
?>
Bookmarks