在多个页面上使用 PHP 变量 [英] Using PHP variables on multiple pages

查看:24
本文介绍了在多个页面上使用 PHP 变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在另一页的一段代码中使用一个页面中的变量?例如在一页上提交表单,在第二页上使用 PHP 脚本将表单中的数据添加到 MySQL 表中

Is it possible to use a variable from one page in a piece of code on another? e.g. submit a form on one page and on the second page use a PHP script to add the data from the form to a MySQL table

感谢大家的帮助

推荐答案

这就是 GET 和 POST 'super' 全局变量的用途.http://www.tizag.com/phpT/postget.php

This is what the GET and POST 'super' globals are for. http://www.tizag.com/phpT/postget.php

这篇关于在多个页面上使用 PHP 变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆