I'm a newcomer to PHP/mySQL, and I'm probably missing something obvious...

Here's the problem (shopping cart application): I've tried to write an array to pull from the database registered customer shipping preferences (form input used is radio buttons) and have it write to this form.

Interestingly enough, their credit card choices DO work perfectly!

What am I missing :-( Any help would be greatly appreciated. Thank you!

Here's the code for the array:

if(($num_rows = mysql_num_rows($result))!=0) {
$searchSuccess="YES";
while($row = mysql_fetch_array($result))
{

if($row["shipvia"] == "Book Rate"){
$Bshipvia = "checked";
}elseif ($row["shipvia"] == "Priority Mail"){
$Pshipvia = "checked";
}elseif ($row["shipvia"] == "International"){
$Ishipvia = "checked";
}

if($row["card_type"] == "Master Card"){
$MCcheck = "checked";
}elseif ($row["card_type"] == "Visa"){
$Vcheck = "checked";
} elseif ($row["card_type"] == "Discover"){
$Dcheck = "checked";
} elseif ($row["card_type"] == "American Express"){
$AXcheck = "checked";
} elseif ($row["card_type"] == "Personal Check"){
$PCcheck = "checked";
} elseif ($row["card_type"] == "Money Order"){
$MOcheck = "checked";
}

$optselect1 = $row["country"] ;
$optselect2 = $row["ship_country"] ;

And here's where I'm trying to write to the form:

<INPUT type=radio name="Ship" value="Book Rate" <?php echo $Bshipvia ?> ><b><font face="Verdana,Arial,Helvetica" size="1" color="#eeeecc">Media/Parcel Post (6 to 9 days)</font></b>&nbsp;
<INPUT type=radio name="Ship" value="Priority Mail" <?php echo $Pshipvia ?> ><b><font face="Verdana,Arial,Helvetica" size="1" color="#eeeecc">Priority Mail (2 to 4 days)</font></b>&nbsp;
<INPUT type=radio name="Ship" value="International" <?php echo $Ishipvia ?> ><b><font face="Verdana,Arial,Helvetica" size="1" color="#eeeecc">International</font></b></td>