$result = mysql_query("SELECT * FROM Persons"); while($row = mysql_fetch_array($result)) { $variable = $row['password']; }