Hello I can't get my script fully operational.
I have it calculating properly but now need a query for fuel type.
<?php
include 'mysql_connect.php';
$query = "SELECT * FROM fuel_price WHERE FuelType='Oil'" ;
$result = mysql_query($query);
$price= mysql_fetch_array($result);
if(isset($_POST['submit'])){
echo "The Price Today is ";
echo "£"; echo $_POST['qtylitres'] * $price ['Price'];
} else {
echo "Please select value";
}
?>
I need to to check fueltype selected on form and calculate total accordingly.
eg $query = "SELECT * FROM fuel_price WHERE FuelType='{$_POST['fueltype'];}'" ;
Please help anyone under pressure.
Thanks