<!DOCTYPE html>
<html>
<body>
<a href="<?php echo $_SERVER[‘PHP_SELF‘]?>?keyword=Google&position=China">搜索</a>
</body>
</html>
<?php
echo "You search ".$_GET[‘keyword‘]." in ".$_GET[‘position‘];
?>
<!DOCTYPE html>
<html>
<body>
<form method="post" action="<?php echo $_SERVER[‘PHP_SELF‘] ?>">
Name:<input type="text" name="name">
<input type="submit">
</form>
</body>
</html>
<?php
$name= $_POST[‘name‘];
echo $name;
?>
版权声明:本文为Lshare原创文章,需要转载的请联系我,有问题欢迎评论或私信。
原文地址:http://blog.csdn.net/geek_geek/article/details/47017409