PHP企业人事工资管理系统范文
程序实现://职员信息录入insert.php <?php
if($ID){ //判断输入信息,若正确则连接数据库 do{require("../config.php");}while($sql==""); //向users表插入数据 $str="INSERT INTO users
VALUES('$ID','$NAME','$XB','$MZ','$CSNY','$XZDZ','$ZC','$ZW','$BM','$BMBM','$ZWBM','$MJ','$PASSW','$HYZK','$ZZMM');"; //插入新数据
if(!$str){ echo "can not insert data"; exit;}
$result=mysql_query($str,$sql); //送出查询字符串 if($result==0){echo "can not query "; exit;}//向aducat表中插入数据 $str="INSERT INTO aducat VALUES
('$XL','$SCHOOL','$GRADATE','$MAJOR','$SPECI','$LANGU','$ID');"; //插入新数据
if(!$str){echo "can not insert data"; exit;}
$result=mysql_query($str,$sql); //送出查询字符串 if($result==0){echo "can not query "; exit;}//向emergen表中插入数据 $str="INSERT INTO emergen VALUES
( '$YWLLR','$YWGX','$YWTX','$YWDH','$YWSYR','$YWSYGX','$YWSYTX','$YWSYDH','$ID');";//插入新数据
if(!$str){echo "can not insert data"; exit;}
$result=mysql_query($str,$sql); //送出查询字符串 if($result==0){echo "can not query "; exit;}
PHP企业人事工资管理系统范文
//向family表中插入数据
$str="INSERT INTO family VALUES
('$JSCH1','$JSXM1','$JSXB1','$JSCSRQ1','$JSZY1','$JSGZDW1','$JSZZ1',
'$JSCH2','$JSXM2','$JSXB2','$JSCSRQ2','$JSZY2','$JSGZDW2','$JSZZ2',
'$JSCH3','$JSXM3','$JSXB3','$JSCSRQ3','$JSZY3','$JSGZDW3','$JSZZ3', '$ID');";//插入新数据 if(!$str){echo "can not insert data"; exit;}
$result=mysql_query($str,$sql); //送出查询字符串 if($result==0){echo "can not query "; exit;}//向resume表中插入数据 $str="INSERT INTO resume VALUES
('$JG','$SG','$TZ','$XUX','$STZK','$HJ','$SFZH','$HOBBY','$YB','$EML','$HYZK','$ZZMM','$XZ','$ID');";//插入新数据 if(!$str){echo "can not insert data"; exit;}
$result=mysql_query($str,$sql); //送出查询字符串 if($result==0){echo "can not query "; exit;}//向base表中插入数据
$str="INSERT INTO base(id,name,password,bmbm,zwbm) VALUES('$ID','$NAME','$PASSW','$BMBM','$ZWBM');";//插入新数据 if(!$str){echo "can not insert data"; exit;}
$result=mysql_query($str,$sql); //送出查询字符串 if($result==0){echo "can not query "; exit;}
mysql_close();//关闭数据库
echo "添加数据成功!<a href=insert.php>返回</a>";} else
{echo "添加数据不成功!<a href=insert.php>返回,请检查数据类型的正确性!</a>";} ?>
(b)、职员信息修改:在修改界面中,首先输入被修改者的帐号(ID)和姓名(NAME),点击“确定”后由程序modify11.php提交到数据库,首先将其原始数据搜索出返回到modify.php中显示,在此基础上对数据进行修改,修改完毕再由程序modify12.php提交到数据库对数据进行更新users,aducat,emergen,resume,family五表操作,提示修改成功后,可返回,继续下一次修改。