Forum Moderators: coopster
$sql = "SELECT '".$shipCode."' FROM shipping WHERE shipType = '".$shipType."'";
$result = mysql_query($sql) or die('Error: ' . mysql_error());
$row = mysql_fetch_assoc($result);
if($row === false) die('Row not found');
echo $row;
$sql = "SELECT shipCode FROM shipping WHERE shipType = '$shipType'";
$result = mysql_query($sql) or die('Error: ' . mysql_error());
$row = mysql_fetch_assoc($result);
if($row === false) die('Row not found');print_r($row);
This will print you exactly what's in the variable. Including the type.
Remember that in SELECT you DON'T want the variable there!
Michal Cibor