Environment 1: Working PHP(5.2.4) MySQL(5.1.30)
Environment 2: Not Working PHP(5.2.6) MySQL(4.1.25-log)
What is it about this function that makes it work in environment 1, and not in environment 2? No errors, just not returning anything.
function GetPrice($type, $level){
$result = mysql_query("SELECT * FROM `types` WHERE id = '$type'") or trigger_error(mysql_error());
while($row = mysql_fetch_array($result)){
foreach($row AS $key => $value) { $row[$key] = stripslashes($value); }
$reg = $row['regprice'];
$nat = $row['natprice'];
}
if($level == "reg"){return $reg;}
if($level == "nat"){return $nat;}
}
I figure it has something to do with the end there, where im comparing $level
to the strings, but i dont know what it should be to work.