Search the Community
Showing results for tags 'decimal places'.
-
hi, ive just started learning php and sql yesterday. im building a timesheets webpage for employees i want to know how to join the 'totalhours' to "totalminutes' and then put it in the query as one value? eg the databse will store 5.25 or 3.75 etc. the employees will type an hour (eg 5 or 3 ) and then click a radio button that says 15mins or 45mins here is the code so far: PHP $sql="INSERT INTO Persons (notes, starttime, date, finishtime, totalhours, company, breaktime) VALUES ('$_POST[notes]','$_POST[starttime]','$_POST[date]','$_POST[finishtime]','$_POST[totalhours]', '$_POST[comp]','$_POST[breaktime]')"; HTML <form action="submittimesheet.php" method="post"> company<input type="text" name="comp"><br> date<input type="date" name="date"><br> start time <input type="time" name="starttime"> finish time <input type="time" name="finishtime"><br> total break time<input type="text" name="breaktime"><br> total hours worked<input type="text" name="totalhours">(number from 1-10)<br> total minutes worked: <br> <input type="radio" value="0" name="totalminutes">0<br> <input type="radio" value="25" name="totalminutes">15<br> <input type="radio" value="50" name="totalminutes">30<br> <input type="radio" value="75" name="totalminutes">45<br> notes<input type="text" name="notes" style="height: 50px;"><br> <input type="submit">