Jeg fandt svaret:
Jeg havde brug for at gemme resultatet (Gem resultatet (for at få egenskaber))
Jeg havde brug for at hente resultatet (Hent resultater fra en forberedt erklæring til de bundne variabler) Gerne uden en while-løkke.
$db = new mysqli("localhost","root","password","xxx");
$statement = $db->prepare("SELECT name, password FROM persons WHERE name=? LIMIT 1");
$statement->bind_param('s', "kevin");
$statement->execute();
$statement->store_result(); // this is what I was missing
if($statement->num_rows){
$statement->bind_result($dbname, $dbpassword);
$statement->fetch(); // this is what I was missing
$statement->free_result();
echo $dbname;
echo $dbpass;
};