Hi there! I looked for a special kind of php form but i couldnt find nothing similar to what i need.. I work with a bunch of people and i need to collect some data from them and deliver them to the administratives.. I need to know when they werent working and why.. A form like this:
Name: John Doe
ID: 12344545
Time of not-working: 11:43
Time Started working: 11:58
Reason: drop down menu with several reasons
Send button
This form would send the data to a mysql database.. And then I would need a page directed to the admnistratives and that page would show:
Name: John Doe
ID: 12344545
Time of not-working: 11:43
Time Started working: 11:58
Total time not working: 00:15
Date: 01-01-2004
Reason: reasons
and they could choose to display the data depending on the date..
i know the basics.. Something like:
<?php
$nome=$_POST["nome"];
$bi=$_POST["bi"];
$mot=$_POST["mot"];
$horai=$_POST["horai"];
$horaf=$_POST["horaf"];
$noname=$_POST["noname"];
$res = mysql_connect([server],[userid],[password]);
@mysql_select_db([enter database name]);
/* SQL CREATE STATEMENT
create table [tablename] (,,,,,)
*/
/* SQL INSERT STATEMENT
insert into [tablename] (nome,bi,mot,horai,horaf,noname) values($nome,$bi,$mot,$horai,$horaf,$noname)
*/
mysql_close($res);
?>
and then call a form.htm with input text.. But i have some problems creating this script and i dont know how to calculate the total time.. etc.. And how to display the data to the admnistratives.. Could anyone help me? thanks in advance..
