hi,


i created a time sheet for internal employees for that i created 12
columns
so when user logins he will get 11 columns in form namely NR(nr) hidden field(primary key)DATE,ENTER TIME(von),LEAVINGTIME(bis),CUSTOMER(kunde),PROJECT(projekt),MAINPROJECT(hvorgang),SUBPROJECT(uvorgan g),TEXT(text),DIFF TIME(ist),ALLOTEDTIME(soll),STATUS(status) and one SAVE button to submit the values in database

**************************************************


now database design, i created table called t_emp where all these columns r mentioned so once user submits the form he can get the value from t_emp and he can see the result in same form using below query
$query = "SELECT * FROM t_emp order by nr DESC";
query = "SELECT id from key_generator where name = 't_emp'";

***************************************************

kunde,projekt,hvorgang,uvorgang,status as these fields is drop down list so i used 2 diff. tables to get the values when user login only for insertion i used t_emp while to retrieve data i used emp_kunde and emp_details,as these r main fields kunde,projekt,hvorgang,uvorgang,status------

<? if (!isset($HTTP_POST_VARS["Save"])) { ?>
SELECT kunde,projekt from emp_kunde
SELECT hvorgang,uvorgang,status,soll from emp_details


**************************************************

this is for insertion data in t_emp
if (isset($HTTP_POST_VARS["Save"]))
{
$query = "INSERT INTO t_emp";
$query.="(nr,datum,von,bis,kunde,projekt,hvorgang,uvorgang,text,ist,soll,status) values "; $query.="('$nr','$datum','$von','$bis','$kunde','$projekt','$hVorgang','$uVorgang','$text','$ist','$ soll','$status')";

//as the nr id int(3) unsigned zerofill PRIMARY KEY (nr), it will always get updated nr. as hidden value whenever user clciks on svae button he get new field with incremented nr.
$updatePK = "UPDATE key_generator set id = $nr where name = 't_emp'";


**********************************************

till date this form is working fine i just want to know whether this si right approach or the professional way to design database
anybody with suggestions or modifying database will be appreciable

thanks and regards