maxudaskin Posted January 19, 2008 Share Posted January 19, 2008 <?php $dept = $_POST['dept']; $dest = $_POST['arrv']; $acft = $_POST['aircraft']; $tail = $_POST['tail']; $ttlt = $_POST['min']/60; $ttlt = round($ttlt,2); $aspd = $_POST['airspeed']; $dptm = $_POST['depttime']; $dstm = $_POST['arrvtime']; $calt = $_POST['alt']; $altt = $_POST['alt_type']; $rout = $_POST['route']; $fnum = $_POST['flight_num']; $query = mysql_query("INSERT INTO `database`.`table` (`departure` ,`destination` ,`flight_id` ,`route` ,`aircraft` ,`totaltime` ,`online` ,`date` ,`type` ,`pid`)VALUES ('{$dept}', '{$dest}', '{$fnum}', '{$rout}', '{$acft}', '{$ttlt}', '{}', '{}', '1', '{}')"); ?> It keeps outputting 0... Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/86722-solved-round-error/ Share on other sites More sharing options...
marcus Posted January 19, 2008 Share Posted January 19, 2008 Try just echoing $_POST['min'] to see if it's even set. Quote Link to comment https://forums.phpfreaks.com/topic/86722-solved-round-error/#findComment-443205 Share on other sites More sharing options...
maxudaskin Posted January 19, 2008 Author Share Posted January 19, 2008 I think the issue was that it wouldn't let me redefine $ttlt while using it in the redefinition. Quote Link to comment https://forums.phpfreaks.com/topic/86722-solved-round-error/#findComment-443209 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.