最基础的PHP分类查询程序
- 最初级的PHP分类查询程序
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>无标题文档</title>
- </head>
- <body>
- <div align="center"><form action="<?php $_SERVER['PHP_SELF'];?>" method="post"><input type="submit" name="sell" value="智慧销售" />
- <input type="submit" name="manager" value="经营管理"/> <input type="submit" name="serve" value="智慧客服"
- /> <input type="submit" name="newemployee" value="智慧新员工" /> <input
- type="submit" name="development" value="个人发展" /></form>
- <?php
- if(!empty($_POST['sell'])){
- $conn=mysql_connect("localhost","root","root");
- if(!$conn){
- die('Could not connect the database!');
- }
- mysql_query("SET NAMES UTF8");
- mysql_query("set character_set_client=utf8");
- mysql_query("set character_set_results=utf8");
- mysql_select_db("test",$conn);
- $sql="select * from ts1 where name like '%智慧销售%' ";
- $result=mysql_query($sql);
- echo '<table height="60%" width="60%" border="1" align="center">';
- while($row=mysql_fetch_assoc($result)){
- echo '<tr height="45px">';
- echo '<td>'.$row['id'].'</td>'.'<td>'.$row['name'].'</td>'.'<td>'.$row['image'].'</td>';
- echo '</tr>';
- }
- echo '</table>';
- mysql_close($conn);
- }
- / / http://www.pprar.com
- ?>
- <?php
- if(!empty($_POST['serve'])){
- $conn=mysql_connect("localhost","root","root");
- if(!$conn){
- die('Could not connect the database!');
- }
- mysql_query("SET NAMES UTF8");
- mysql_query("set character_set_client=utf8");
- mysql_query("set character_set_results=utf8");
- mysql_select_db("test",$conn);
- $sql="select * from ts1 where name like '%智慧客服%' ";
- $result=mysql_query($sql);
- echo '<table height="60%" width="60%" border="1" align="center">';
- while($row=mysql_fetch_assoc($result)){
- echo '<tr height="45px">';
- echo '<td>'.$row['id'].'</td>'.'<td>'.$row['name'].'</td>'.'<td>'.$row['image'].'</td>';
- echo '</tr>';
- }
- echo '</table>';
- mysql_close($conn);
- }
- ?>
- <?php
- if(!empty($_POST['manager'])){
- $conn=mysql_connect("localhost","root","root");
- if(!$conn){
- die('Could not connect the database!');
- }
- mysql_query("SET NAMES UTF8");
- mysql_query("set character_set_client=utf8");
- mysql_query("set character_set_results=utf8");
- mysql_select_db("test",$conn);
- $sql="select * from ts1 where name like '%经营管理%' ";
- $result=mysql_query($sql);
- echo '<table height="60%" width="60%" border="1" align="center">';
- while($row=mysql_fetch_assoc($result)){
- echo '<tr height="45px">';
- echo '<td>'.$row['id'].'</td>'.'<td>'.$row['name'].'</td>'.'<td>'.$row['image'].'</td>';
- echo '</tr>';
- }
- echo '</table>';
- mysql_close($conn);
- }
- ?>
- <?php
- if(!empty($_POST['newemployee'])){
- $conn=mysql_connect("localhost","root","root");
- if(!$conn){
- die('Could not connect the database!');
- }
- mysql_query("SET NAMES UTF8");
- mysql_query("set character_set_client=utf8");
- mysql_query("set character_set_results=utf8");
- mysql_select_db("test",$conn);
- $sql="select * from ts1 where name like '%智慧新员工%'";
- $result=mysql_query($sql);
- echo '<table height="60%" width="60%" border="1" align="center">';
- while($row=mysql_fetch_assoc($result)){
- echo '<tr height="45px">';
- echo '<td>'.$row['id'].'</td>'.'<td>'.$row['name'].'</td>'.'<td>'.$row['image'].'</td>';
- echo '</tr>';
- }
- echo '</table>';
- mysql_close($conn);
- }
- ?>
- <?php
- if(!empty($_POST['development'])){
- $conn=mysql_connect("localhost","root","root");
- if(!$conn){
- die('Could not connect the database!');
- }
- mysql_query("SET NAMES UTF8");
- mysql_query("set character_set_client=utf8");
- mysql_query("set character_set_results=utf8");
- mysql_select_db("test",$conn);
- $sql="select * from ts1 where name like '%个人发展%' ";
- $result=mysql_query($sql);
- echo '<table height="60%" width="60%" border="1" align="center">';
- while($row=mysql_fetch_assoc($result)){
- echo '<tr height="45px">';
- echo '<td>'.$row['id'].'</td>'.'<td>'.$row['name'].'</td>'.'<td>'.$row['image'].'</td>';
- echo '</tr>';
- }
- echo '</table>';
- mysql_close($conn);
- }
- ?>
- </div>
- </body>
- </html>
最基础的PHP分类查询程序的更多相关文章
- C++ 容器的综合应用的一个简单实例——文本查询程序
C++ 容器的综合应用的一个简单实例——文本查询程序 [0. 需求] 最近在粗略学习<C++ Primer 4th>的容器内容,关联容器的章节末尾有个很不错的实例.通过实现一个简单的文本查 ...
- SQL-三级分类查询
/*SQLyog 企业版 - MySQL GUI v8.14 MySQL - 5.5.40 : Database - appinfodb******************************** ...
- php实现无限级分类查询(递归、非递归)
递归函数实现方式 上面提到,递归函数的也是借助于栈的机制实现的,但是底层对于栈的处理对于程序员来说都是透明的,程序员只需要关心应用的实现逻辑.所以说使用递归处理上述问题理解起来比较容易,代码也比较简洁 ...
- (2.8)Mysql之SQL基础——索引的分类与使用
(2.8)Mysql之SQL基础——索引的分类与使用 关键字:mysql索引,mysql增加索引,mysql修改索引,mysql删除索引 按逻辑分类: 1.主键索引(聚集索引)(也是唯一索引,不允许有 ...
- python基础——重访类型分类
python基础--重访类型分类 对象根据分类来共享操作:例如,字符串.列表和元组都共享诸如合并.长度和索引等序列操作. 只有可变对象(列表.字典和集合)可以原处修改:我们不能原处修改数字,字符串.元 ...
- SQL 语句与性能之联合查询和联合分类查询
select * from t1 left join t2 on t2.sysno =t1.ASysNo left join t3 on t3.sysno =t2.ASysNo left join t ...
- 基于php基础语言编写的小程序之计算器
基于php基础语言编写的小程序之计算器 需求:在输入框中输入数字进行加.减.乘.除运算(html+php) 思路: 1首先要创建输入数字和运算符的输入框,数字用input的text属性,运算符用sel ...
- 【T-SQL基础】02.联接查询
概述: 本系列[T-SQL基础]主要是针对T-SQL基础的总结. [T-SQL基础]01.单表查询-几道sql查询题 [T-SQL基础]02.联接查询 [T-SQL基础]03.子查询 [T-SQL基础 ...
- 【T-SQL基础】03.子查询
以前总是追求新东西,发现基础才是最重要的,今年主要的目标是精通SQL查询和SQL性能优化. 本系列[T-SQL基础]主要是针对T-SQL基础的总结. [T-SQL基础]01.单表查询-几道sql查询题 ...
随机推荐
- STL源码剖析(容器适配器)
在STL中,有一类容器完全以底部容器为基础进行实现,这类容器归类为container adapter. priority_queue priority_queue默认使用vector为基础,加上hea ...
- Lr_debug_message,Lr_output_message,Lr_error_message,Lrd_stmt,Lrd_fetch
今天在群里,问了 Lr_debug_message,Lr_output_message,Lr_error_message,Lrd_stmt,Lrd_fetch.下 面我整理了下Lr_debug_mes ...
- Linux程序员福利 - 追女友神奇(Linux终端运行炫酷程序)
概述 作为IT人员,给同事的感觉呆板,不会会浪漫,不懂情趣.其实不然,我们可以用我们的技能创造出IT人员独有的浪漫.girlLove脚本就可以实现IT人员的浪漫.girlLove本质上是一个简易的问答 ...
- Android面试常问到的知识点
一.算法,数据结构 1.排序算法 2.查找算法 3.二叉树 4.广度,深度算法: 二.java基础 1.集合Collection,List,Map等常用方法,特点,关系: 2.线程的同步,中断方式有几 ...
- C# EF使用性能消耗列表 https://msdn.microsoft.com/zh-cn/library/cc853327.aspx
性能注意事项(实体框架) .NET Framework (current version) 其他版本 本主题介绍 ADO.NET 实体框架的性能特征,并提供一些注意事项帮助改善实体框架应用程序 ...
- C# nosql之redis初体验
Redis官方是不支持windows的,只是 Microsoft Open Tech group 在 GitHub上开发了一个Win64的版本,项目地址是: https://github.com/MS ...
- 转载 :sql server分区 http://blog.itpub.net/27099995/viewspace-1081158/
转载:http://blog.itpub.net/27099995/viewspace-1081158/ 在 sql server 2005 之前不提供分区表,但可以用其他方式建立“分区表”,sql ...
- 阻塞IO、非阻塞IO的区别
1.类与类之间的关系:依赖,实现,泛化(继承),关联,组合,聚合. 1)依赖(虚线):一个类是 另一个类的函数参数 或者 函数返回值. 2)实现(实线加小圆):对纯虚函数类(抽象类)的实现. 3)继承 ...
- SQL数据库相关
数据库相关知识点 SQL, 对表的理解, 对表的主键, 外键的理解, 视图, 为什么要有视图, 视图有什么功能, 视图与表有什么区别 主键是唯一标识的一条记录,不能重复,不能为空. 表的外键是另一个表 ...
- spring和hibernate整合,事务管理
一.spring和hibernate整合开发步骤 1 引入jar文件,用户libarary列表如下 //spring_core spring3..9core\commons-logging-1.2.j ...