Dont u have more records in your DB table "Warrants", if u do u need a where condition of witch value do u want ...
$query_ref = "SELECT RefNumber FROM Warrants WHERE ....";
Your question is how to extract values from DB?
Here is a little example based from your code:
$query_ref = "SELECT RefNumber FROM Warrants";
$ref = mysql_query($query_ref) or die(mysql_error());
if (mysql_num_rows($ref)) {
while ($row_ref = mysql_fetch_assoc($ref)) {
$records[] = $row_ref;
}
echo "<pre>",print_r($records,1),"</pre>";
} else {
echo "The SELECT extract zero records!";
}
If u have problem setting up cookies, then u should check here.