search

index.php:

<code><span><span><?php </span><span>if</span> (<span>isset</span>(<span>$_POST</span>[<span>'userValue'</span>])&&!<span>empty</span>(<span>$_POST</span>[<span>'userValue'</span>])) {
  <span>echo</span><span>"您输入的是"</span>.<span>$_POST</span>[<span>'userValue'</span>];
} 
<span>else</span> {
  <span>echo</span><span>"没有接收到post值"</span>;
}
<span>?></span></span><span><span>html</span><span>lang</span>=<span>"zh-CN"</span>></span><span>head</span>></span><span>meta</span><span>charset</span>=<span>"utf-8"</span>><span>meta</span><span>http-equiv</span>=<span>"X-UA-Compatible"</span><span>content</span>=<span>"IE=edge"</span>><span>meta</span><span>name</span>=<span>"viewport"</span><span>content</span>=<span>"width=device-width, initial-scale=1"</span>><span><!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! --></span><span>title</span>>music<span><span>title</span>></span><span><!-- Bootstrap --></span><span><!-- 新 Bootstrap 核心 CSS 文件 --></span><span>link</span><span>rel</span>=<span>"stylesheet"</span><span>href</span>=<span>"//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css"</span>><span><span>head</span>></span><span>body</span>><span>div</span><span>class</span>=<span>"container"</span>><span>form</span><span>action</span>=<span>"<?php echo $_SERVER['PHP_SELF']; ?>"</span><span>method</span>=<span>"post"</span>><span>div</span><span>class</span>=<span>"input-group input-group-lg"</span>><span>input</span><span>type</span>=<span>"text"</span><span>class</span>=<span>"form-control"</span><span>name</span>=<span>"userValue"</span><span>placeholder</span>=<span>"传到本页面"</span>><span>span</span><span>class</span>=<span>"input-group-btn"</span>><span>input</span><span>type</span>=<span>"submit"</span><span>class</span>=<span>"btn btn-default"</span><span>value</span>=<span>"GO!"</span>><span><span>span</span>></span><span><span>div</span>></span><span><!-- /input-group --></span><span><span>form</span>></span><span>form</span><span>action</span>=<span>"demo.php"</span><span>method</span>=<span>"post"</span>><span>div</span><span>class</span>=<span>"input-group input-group-lg"</span>><span>input</span><span>type</span>=<span>"text"</span><span>class</span>=<span>"form-control"</span><span>name</span>=<span>"userValue"</span><span>placeholder</span>=<span>"传到另一个页面"</span>><span>span</span><span>class</span>=<span>"input-group-btn"</span>><span>input</span><span>type</span>=<span>"submit"</span><span>class</span>=<span>"btn btn-default"</span><span>value</span>=<span>"GO!"</span>><span><span>span</span>></span><span><span>div</span>></span><span><!-- /input-group --></span><span><span>form</span>></span><span><span>div</span>></span><span><!-- jQuery文件。务必在bootstrap.min.js 之前引入 --></span><span>script</span><span>src</span>=<span>"//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"</span>><span></span><span><span>script</span>></span><span><!-- 最新的 Bootstrap 核心 JavaScript 文件 --></span><span>script</span><span>src</span>=<span>"//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"</span>><span></span><span><span>script</span>></span><span><span>body</span>></span><span><span>html</span>></span></code>

demo.php:

<code><span><span><?php </span><span>if</span> (<span>isset</span>(<span>$_POST</span>[<span>'userValue'</span>])&&!<span>empty</span>(<span>$_POST</span>[<span>'userValue'</span>])) {
  <span>echo</span><span>"您输入的是"</span>.<span>$_POST</span>[<span>'userValue'</span>];
} 
<span>else</span> {
  <span>echo</span><span>"没有接收到post值"</span>;
}
<span>?></span></span><span>meta</span><span>charset</span>=<span>"utf-8"</span>></span></code>

Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above has introduced the PHP form case, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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
10款好看又实用的Bootstrap后台管理系统模板(快来下载)10款好看又实用的Bootstrap后台管理系统模板(快来下载)Aug 06, 2021 pm 01:55 PM

一个好的网站,不能只看外表,网站后台同样很重要。本篇文章给大家分享10款好看又实用的Bootstrap后台管理系统模板,可以帮助大家快速建立强大有美观的网站后台,欢迎下载使用!如果想要获取更多后端模板,请关注php中文网后端模板栏目!

华为GT3 Pro和GT4的差异是什么?华为GT3 Pro和GT4的差异是什么?Dec 29, 2023 pm 02:27 PM

许多用户在选择智能手表的时候都会选择的华为的品牌,其中华为GT3pro和GT4都是非常热门的选择,不少用户都很好奇华为GT3pro和GT4有什么区别,下面就就给大家介绍一下二者。华为GT3pro和GT4有什么区别一、外观GT4:46mm和41mm,材质是玻璃表镜+不锈钢机身+高分纤维后壳。GT3pro:46.6mm和42.9mm,材质是蓝宝石玻璃表镜+钛金属机身/陶瓷机身+陶瓷后壳二、健康GT4:采用最新的华为Truseen5.5+算法,结果会更加的精准。GT3pro:多了ECG心电图和血管及安

bootstrap与jquery是什么关系bootstrap与jquery是什么关系Aug 01, 2022 pm 06:02 PM

bootstrap与jquery的关系是:bootstrap是基于jquery结合了其他技术的前端框架。bootstrap用于快速开发Web应用程序和网站,jquery是一个兼容多浏览器的javascript库,bootstrap是基于HTML、CSS、JAVASCRIPT的。

7款实用响应式Bootstrap电商源码模板(快来下载)7款实用响应式Bootstrap电商源码模板(快来下载)Aug 31, 2021 pm 02:13 PM

好看又实用的Bootstrap电商源码模板可以提高建站效率,下面本文给大家分享7款实用响应式Bootstrap电商源码,均可免费下载,欢迎大家使用!更多电商源码模板,请关注php中文网电商源码​栏目!

修复:截图工具在 Windows 11 中不起作用修复:截图工具在 Windows 11 中不起作用Aug 24, 2023 am 09:48 AM

为什么截图工具在Windows11上不起作用了解问题的根本原因有助于找到正确的解决方案。以下是截图工具可能无法正常工作的主要原因:对焦助手已打开:这可以防止截图工具打开。应用程序损坏:如果截图工具在启动时崩溃,则可能已损坏。过时的图形驱动程序:不兼容的驱动程序可能会干扰截图工具。来自其他应用程序的干扰:其他正在运行的应用程序可能与截图工具冲突。证书已过期:升级过程中的错误可能会导致此issu简单的解决方案这些适合大多数用户,不需要任何特殊的技术知识。1.更新窗口和Microsoft应用商店应用程

8款Bootstrap企业公司网站模板(源码免费下载)8款Bootstrap企业公司网站模板(源码免费下载)Aug 24, 2021 pm 04:35 PM

好看又实用的企业公司网站模板可以提高您的建站效率,下面PHP中文网为大家分享8款Bootstrap企业公司网站模板,均可免费下载,欢迎大家使用!更多企业站源码模板,请关注php中文网企业站源码栏目!

bootstrap中sm是什么意思bootstrap中sm是什么意思May 06, 2022 pm 06:35 PM

在bootstrap中,sm是“小”的意思,是small的缩写;sm常用于表示栅格类“.col-sm-*”,是小屏幕设备类的意思,表示显示大小大于等于768px并且小于992px的屏幕设备,类似平板设备。

如何修复无法连接到iPhone上的App Store错误如何修复无法连接到iPhone上的App Store错误Jul 29, 2023 am 08:22 AM

第1部分:初始故障排除步骤检查苹果的系统状态:在深入研究复杂的解决方案之前,让我们从基础知识开始。问题可能不在于您的设备;苹果的服务器可能会关闭。访问Apple的系统状态页面,查看AppStore是否正常工作。如果有问题,您所能做的就是等待Apple修复它。检查您的互联网连接:确保您拥有稳定的互联网连接,因为“无法连接到AppStore”问题有时可归因于连接不良。尝试在Wi-Fi和移动数据之间切换或重置网络设置(“常规”>“重置”>“重置网络设置”>设置)。更新您的iOS版本:

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)