I am tring to get one single cell from a database. The primary key is username. I want to store the single cell in a variable called $charity. The code below seems to work. However, this outputs to the screen the answer. I want to store the answer in a variable.
CODE
$query="SELECT charity FROM `users` WHERE username='$username'";
$result=mysql_query($query);
$row = mysql_fetch_assoc($result);
echo $row['charity'];
$result=mysql_query($query);
$row = mysql_fetch_assoc($result);
echo $row['charity'];

