PHP 4.1.0 及以后版本使用POST变量的接收

具体问题是这样的
在表单页1.php

1<form action="2.php" method="post" name="form">
2<table align="centre" width="75%">
3<tr>
4<td><input name="name" type="text"/></td>
5<td><input name="submit" type="submit" value="Submit"/></td>
6</tr>
7</table>
8</form>

提交页面2.php

1   
2echo "

<br/>

1".$name."

<br/>

1";//显示从1.php传递过来的变量$name   

结果传递过来的变量为空
单页的编译没有问题。
甚为郁闷阿~~
系统的环境是win2000 advance server IIS5.0 + php4 + Sql server
以前我下window 用apache+php+mysql没有这样的问题
所以估计是配置方面除了差错
请高手指教一下啊~~~

---------------------------------------------------------------

提交页面2.php

1   
2echo "

<br/>

1".$_POST['name']."

<br/>

1";//显示从1.php传递过来的变量$name   

echo $_POST['变量名'];//这样输出post来的变量

或把php.ini文件中,register_globals设为on!!!不过不推荐这样做

Published At
Categories with Web编程
Tagged with
comments powered by Disqus