Database connections don't really have names in code... Do you mean that it's a PDO object? If so then what is $pdo? Or put another way, how is $dbmembers initialized?
$dbmembers = mysql_connect("localhost","root","")or die ('Could not connect to using those details');
mysql_select_db('members', $dbmembers) or die ('Could not connect to members Database');
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
You're trying to mix and match PDO objects with resources from mysql_connect. That's not going to work. You would need a separate PDO connection for the remote database and then execute the query against that.
$pdo_members = new PDO('credentials go here');
$query = ("SELECT * FROM members WHERE usertype <> 'admin'");
$result = $pdo_members->query($query);
while ($row = $result->fetch(PDO::FETCH_OBJ))
{
echo "<option value='$row->id'>$row->firstname $row->lastname</option>";
}