首页上一页 1  下一页尾页 1 条记录 1/1页
        表单提交根本没反应
                 	
                        发表在PHP图书答疑
                        2009-06-11                                                
                    		
                                                                            	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    
                                           [font size=6]<?php
if($Submit=="提交"){
$username=$_POST[username];
$password=$_POST[password];
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>获取文本框提交的值</title>
<style type="text/css">
<!--
.style1 {font-size: 13px}
-->
</style>
</head>
<body>
<table width="283" height="85" border="1" cellpadding="0" cellspacing="0" background="images/admin2.gif">
<form name="form1" method="post" action="index.php">
<tr>
<td width="114" height="30" align="center" class="style1">管理员:</td>
<td width="163" height="30" align="center"><input name="username" type="text" id="username" size="20"></td>
</tr>
<tr>
<td align="center" class="style1">密码:</td>
<td height="30" align="center"><input name="password" type="password" id="password" value="" size="20"></td>
</tr>
<tr>
<td> </td>
<td height="25">  <input type="submit" name="Submit" value="提交"></td>
</tr>
</form>
</table>
</span>
<table width="284" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="25" align="center" class="style1"><?php echo "管理员:$username"?></td>
</tr>
<tr>
<td height="25" align="center" valign="middle" class="style1"><?php echo "密码:$password";?></td>
</tr>
</table>
</body>
</html>
[font size=4][font color=#FF0000]这是PHP范例宝典里实例023的代码,但传到PHP空间上和本地测试,输入用户名和密码点提交按钮后根本显示不了<?php echo "管理员:$username"?>和<?php echo "密码:$password>里面的内容,我把后面的例子试过几个,只要有<?php
if($Submit=="提交"){
......
}
?>
都没有反应,没有这语句的倒可以运行得出来.不知道什么问题?[/font][/font][/font]
                
        	
        
        
    if($Submit=="提交"){
$username=$_POST[username];
$password=$_POST[password];
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>获取文本框提交的值</title>
<style type="text/css">
<!--
.style1 {font-size: 13px}
-->
</style>
</head>
<body>
<table width="283" height="85" border="1" cellpadding="0" cellspacing="0" background="images/admin2.gif">
<form name="form1" method="post" action="index.php">
<tr>
<td width="114" height="30" align="center" class="style1">管理员:</td>
<td width="163" height="30" align="center"><input name="username" type="text" id="username" size="20"></td>
</tr>
<tr>
<td align="center" class="style1">密码:</td>
<td height="30" align="center"><input name="password" type="password" id="password" value="" size="20"></td>
</tr>
<tr>
<td> </td>
<td height="25">  <input type="submit" name="Submit" value="提交"></td>
</tr>
</form>
</table>
</span>
<table width="284" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="25" align="center" class="style1"><?php echo "管理员:$username"?></td>
</tr>
<tr>
<td height="25" align="center" valign="middle" class="style1"><?php echo "密码:$password";?></td>
</tr>
</table>
</body>
</html>
[font size=4][font color=#FF0000]这是PHP范例宝典里实例023的代码,但传到PHP空间上和本地测试,输入用户名和密码点提交按钮后根本显示不了<?php echo "管理员:$username"?>和<?php echo "密码:$password>里面的内容,我把后面的例子试过几个,只要有<?php
if($Submit=="提交"){
......
}
?>
都没有反应,没有这语句的倒可以运行得出来.不知道什么问题?[/font][/font][/font]

 
	
                                                 VIP会员
VIP会员 购物车
购物车

 私信
                         私信 
                     发表新帖
发表新帖 立即签到
立即签到 
        		  
        		 
         		 关注
关注
                  回复
 回复 支持(
                	支持( 反对(
                    反对( 
                







 
                     
                     
					 
						 
						 
						 
						