|
我在一个前一个html或PHP中定义的变量如何用到后一个,甚至后几个PHP文件中啊?
比如:
//test.html
....
<form method=post action="test1.php">
....
<input type=text name="user_name">
....
</form>
...
//test1.php
...
<?
$link=@mysql_connect("","","");
$query="select * from test where user_name='$user_name'";
....
if (1)
{
header("location: test2.php");
}
?>
...
//test2.php
<?echo "username is :".$user_name?>//到这里时$user_name就不能使用了,怎么让上面的$user_name的
值传到这里呢?
先谢谢了! |
|