Home  >  Article  >  Backend Development  >  php小型企业库存管理系统的设计与实现代码_php实例

php小型企业库存管理系统的设计与实现代码_php实例

WBOY
WBOYOriginal
2016-06-07 17:25:46980browse

php小型企业库存管理系统的设计与实现代码_php实例

双专业毕业论文做了一个小型企业库存管理系统,使用PHP&mysql组合进行开发。头一次开发稍微大一点的东西,php也是自学的。这里想跟大家一起分享一下

check_login 模块

复制代码 代码如下:


session_start();
$workid=$_GET['wid'];//获取工作号
if($workid!=$_SESSION['$workid']||$workid==''){
echo "";
}
?>

function.inc//主要包括数据库连接模块
复制代码 代码如下:

function mysql_link($user="admin",$password="admin",$database="systembase"){
$id=mysql_connect("localhost",$user,$password);
if(!$id){
die('Could not connect: ' . mysql_error());
}
if (!mysql_select_db($database,$id)){
die ("Can\'t select_db : " . mysql_error());
}
//改变客户端字符集编码为gb2312
mysql_query("SET NAMES gb2312");
return $id;
}
?>

仓库管理界面storage.php
复制代码 代码如下:


2 3 include "inc/check_login.php";
4 include "inc/function.inc";
5 $id=mysql_link("storage","storage");//建立storage连接
6
7 $query="select * from admin where admin_id='$workid'";//定位仓库
8 $result=mysql_query($query,$id);
9 $info=mysql_fetch_array($result,MYSQL_ASSOC);
$stoid=$info['storage_id'];
?>





Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn