10c09-2.php
来自「介绍PHP5的给类型函数应用」· PHP 代码 · 共 28 行
PHP
28 行
<?php// Open the sessionsession_start();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Data Processing Page</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head><body><p><?php// If this session is not valid, say so:if (!isset($_SESSION['validsubmit']) || !$_SESSION['validsubmit']) { echo "ERROR: Invalid form submission, or form already submitted!";} else { // This was valid, so first of all clear the validity: $_SESSION['validsubmit'] = false; // Now echo out the data: echo "Your name is {$_POST['name']}? That's a nice name.";}?></p></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?