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