This seems like it should be very simple but having many problems. In previous scripts I have grabed $Code and $CC, both of which return the correct values. Now I need this script to look into my db and match the Motorcycle_Type and the CCs value must be between the CC_Low and CC_High. Then I grab the Motor_Factor and display it in a combo box. This is just to make sure the right value comes out. Urgent project must be finished ASAP.
<?php //Get Motorcycle Factor with CODE and CC's
$conn_motor_factor = odbc_connect("test", "", ""
or die ("could not connect to database."
$query_motor_factor = "SELECT Motorcycle_Type, CC_Low, CC_High, Motorcycle_Factor FROM Bodily_Injury WHERE Motorcycle_Type = '$CODE' AND ('$CC' BETWEEN CC_Low AND CC_High)";
$result_motor_factor = odbc_exec($conn_motor_factor, $query_motor_factor)
or die ("could not execute query."
echo "<select name='moto_factor'>\n";
while ($row_motor_factor = odbc_fetch_array($result_motor_factor))
{
extract($row_motor_factor);
echo "<option value=$Motorcycle_Factor>$Motorcycle_Factor\n";
}
echo "</select>\n";
<?php //Get Motorcycle Factor with CODE and CC's
$conn_motor_factor = odbc_connect("test", "", ""
or die ("could not connect to database."
$query_motor_factor = "SELECT Motorcycle_Type, CC_Low, CC_High, Motorcycle_Factor FROM Bodily_Injury WHERE Motorcycle_Type = '$CODE' AND ('$CC' BETWEEN CC_Low AND CC_High)";
$result_motor_factor = odbc_exec($conn_motor_factor, $query_motor_factor)
or die ("could not execute query."
echo "<select name='moto_factor'>\n";
while ($row_motor_factor = odbc_fetch_array($result_motor_factor))
{
extract($row_motor_factor);
echo "<option value=$Motorcycle_Factor>$Motorcycle_Factor\n";
}
echo "</select>\n";