<html>

<frameset rows="50%,50%">

<frame src="/Test/header.php">

<frameset cols="25%,75%">
<frame src="/Test/collect.php">
<frame src="/Test/view.php">
</frameset>

</frameset>

</html>

header.php
<html>
<head>
</head>
<body>
<h1>
管理员登录界面</h1>
</body>
</html>

collect.php
<html>
<head>
</head>
<body>
员工号:<input type="text"></input>
<button type="button"value="查询">查询</button>
</body>
</html>

view.php
<html>
<head>
</head>
<body>
<p>This is the View.
</body>
</html>

POST GET test

<html>

<body>

<?php

<form action="success.php" method="post">

Name:<input type="text" name="name"><br>

pwd:<input type="password" name="pwd"><br>

<input type="submit">

</form>

?>

</body>

</html>

success.php

<html>

<body>

<?php

welcome<?php echo $_POST["name"];?>

?>

</body>

</html>

form_check

<!DOCTYPE html>

<html>

<head>

<style>

.class{#ff000};

</style>

</head>

<body>

<h2>PHP  form check</h2></br>

<span class="error">necessary message</span></br>

<form action="check.php" method="post">

Name:<input type="text" name="name"><span class="error"><?php echo $nameErr;?></span></br>

Email:<input type="text" name="email"><span class="error"><?php echo $emailErr;?></span></br>

Web:<input type="text" name="web"></br>

Comment:<input type="textarea" name="comment"></br>

Gender:<input type="radio" name="gender">male &nbsp<input type="radio" name="gender">female <?php echo $genderErr;?></br>

<input type="submit">

</form>

</body>

</html>

check.php

<!DOCTYPE html>

<html>

<head>

</head>

<body>

<?php

$nameErr=$emailErr=$genderErr=$webErr="";

$name=$email=$gender=$web="";

if($_SERVER["REQUEST_METHOD"]=="POST"){

if(empty($_POST["name"])){

$nameErr="Name is necessary";

}else{

$name=test_input($_POST["name"]);}

if(empty($_POST["email"])){

$emailErr="email is necessary";

}else{

$email=test_input($_POST["email"]);}

if(empty($_POST["web"])){

$webErr="email is necessary";

}else{

$web=test_input($_POST["web"]);}

if(empty($_POST["gender"])){

$genderErr="email is necessary";

}else{

$gender=test_input($_POST["gender"]);}

}

?>

<?php

echo"<h1> Your input is:</h1>"</br>

echo $name;

echo "<br>";

echo $email;

echo "<br>";

echo $web;

echo "<br>";

echo $comment;

echo "<br>";

echo $gender;

echo "<br>";

?>

</body>

</html>

php简单框架的应用实例的更多相关文章

  1. RDIFramework.NET -.NET快速信息化系统开发整合框架 【开发实例 EasyUI】之产品管理(WebForm版)

    RDIFramework.NET—.NET快速开发整合框架 [开发实例]之产品管理(WebForm版) 接上篇:RDIFramework.NET (.NET快速信息化系统开发整合框架) [开发实例]之 ...

  2. RDIFramework.NET-.NET快速信息化系统开发整合框架 【开发实例 EasyUI】之产品管理(MVC版)

    RDIFramework.NET—.NET快速开发整合框架 [开发实例]之产品管理(MVC版) 接上篇:RDIFramework.NET (.NET快速信息化系统开发整合框架) [开发实例]之产品管理 ...

  3. 持久化框架Hibernate 开发实例(一)

    1 Hibernate简介 Hibernate框架是一个非常流行的持久化框架,其中在web开发中占据了非常重要的地位, Hibernate作为Web应用的底层,实现了对数据库操作的封装.HIberna ...

  4. 关于bootstrap框架美化的实例教程(python)

    经过上一章的内容,其实就页面层来说已结可以很轻松的实现功能了,但是很明显美观上还有很大的欠缺,现在有一些很好的前端css框架,如AmazeUI,腾讯的WeUI等等,这里推荐一个和flask集成很好的b ...

  5. SSM框架快速整合实例——学生查询

    一.快速准备 SSM 框架即 Spring 框架.SpringMVC 框架.MyBatis 框架,关于这几个框架的基础和入门程序,我前面已经写过几篇文章作为基础和入门介绍了.这里再简单的介绍一下: 1 ...

  6. PureMVC和Unity3D的UGUI制作一个简单的员工管理系统实例

    前言: 1.关于PureMVC: MVC框架在很多项目当中拥有广泛的应用,很多时候做项目前人开坑开了一半就消失了,后人为了填补各种的坑就遭殃的不得了.嘛,程序猿大家都不喜欢像文案策划一样组织文字写东西 ...

  7. Hibernate入门2.简单的项目开发实例

    Hibernate入门2.简单的项目开发实例 这一节通过一个简单的项目学习Hibernate项目的配置 代码下载 : 链接: http://pan.baidu.com/s/1zlgjl 密码: p34 ...

  8. spring的了解以及简单框架的搭建

    了解spring: Spring是一个开源的控制反转(Inversion of Controller)和面向切面(AOP)的框架,目的是为了简化开发. IOC(控制反转): public class ...

  9. Java反射(六)纯面向接口编程的简单框架实践

    我们知道在使用MyBatis开发时,只需要添加DAO接口和对应的映射XML文件,不需要写DAO的实现类,其实底层是通过动态代理实现. 本文将使用前几篇文章的知识点实现一个纯面向接口编程的简单框架,与M ...

随机推荐

  1. Ubuntu16.04下安装VS Code

    在Ubuntu下面安装Visual Studio Code sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make sudo apt-get up ...

  2. [LeetCode] Combination Sum IV 组合之和之四

    Given an integer array with all positive numbers and no duplicates, find the number of possible comb ...

  3. [LeetCode] Rectangle Area 矩形面积

    Find the total area covered by two rectilinear rectangles in a2D plane. Each rectangle is defined by ...

  4. [LeetCode] Combine Two Tables 联合两表

    Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonId ...

  5. [LeetCode] Gas Station 加油站问题

    There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You ...

  6. [LeetCode] Scramble String 爬行字符串

    Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrin ...

  7. R - MQ

    1. rabbit MQ 安装 Rabbit MQ 是建立在强大的Erlang OTP平台上,因此安装Rabbit MQ的前提是安装Erlang.通过下面两个连接下载安装3.2.3 版本: 下载并安装 ...

  8. 关于mirai病毒的一些研究

    首页好像只能显示随笔,之前发在文章里面的,见文章http://www.cnblogs.com/mrchang/articles/6210681.html

  9. Servlet中以HashMap存放临时变量,解决跳转新页面请求参数过多时浏览器地址栏超长

    具体使用方法如下: 1.在跳转之前将需要的参数串encodeURIComponent后作为参数value,UUID作为key一起POST到Servlet保存到HashMap中: 2.在Servlet发 ...

  10. 读《单页web应用》-回顾作用域

    js中没有块级作用域,只有全局作用域和函数作用域.全局变量可以在任何地方访问,局部变量只能在声明它的地方访问. var a=1; function func(){ var a=2; } console ...