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

我是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']  
?>


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

membalas semua(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']  
?>


Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan
Tentang kita Penafian Sitemap
Laman web PHP Cina:Latihan PHP dalam talian kebajikan awam,Bantu pelajar PHP berkembang dengan cepat!