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

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


최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!