Home > Backend Development > PHP Tutorial > 如何取同一php文件里的post值

如何取同一php文件里的post值

WBOY
Release: 2016-06-13 12:21:03
Original
901 people have browsed it

怎么取同一php文件里的post值
代码假设为 

<br /><?php<br />if($_POST) {<br />$a = $_POST['a'];<br /> echo "$a ";   //可以正常输出的。<br />}else{<br />$a = $_POST['a'];<br /> echo "$a ";   //不能输出值!!!!!<br />}<br />?><br />
Copy after login



请问下,怎么才能在 else 里面获得 $_POST['a'] 的值?求办法。
------解决思路----------------------

引用:
Quote: 引用:

说说你具体的需求,才能更好的回答你得问题。你这说的完全不清楚,无法回答。


就是在POST页面填写了一个内容,然后提交后,在非POST页面要获取这个内容


存到session里,数据库里,文件里,等等,再取
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template