php怎么两个页面怎么交互传值
女神的闺蜜爱上我
女神的闺蜜爱上我 2017-01-24 11:55:28
0
1
1581

我是PHP新手自学的。这是main1.php 我想把TXT文本的值传到main2.php该怎么传?各位看看我写的 mian2.php没有获取到TXT的值?

<html> 
<title>This is my page!!!</title> 
<body> 
<form action="main2.php?name=txtname" meth="post"> 
<input type="text" id="txtname" name="txtname"/><br/> 
<input type ="submit" value='Hit Me'/> 
</form> 
<? 
echo 'this txtvalue is '.'['.$txtname.']'; 
?> 
<br/> 
</body> 
</html>
<?php  
 print "You pass to the value :".$_REQUEST['txtname']  
?>


女神的闺蜜爱上我
女神的闺蜜爱上我

全員に返信(1)
巴扎黑
<form action="main2.php" meth="post">   
<input type="text" id="txtname" name="txtname"/><br/>   
<input type ="submit" value='Hit Me'/>   
</form>    
<?php  
 print "You pass to the value :".$_POST['txtname']  
?>


いいねを押す +0
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!