首页上一页 1 下一页尾页 1 条记录 1/1页
PHP程序范例宝典问题!
发表在PHP图书答疑
2010-10-20
是否精华
是
否
版块置顶:
是
否
这个是光盘上的源代码:
<?php
if($Submit=="提交"){
$hiddens=$_POST[ID];}
?>
<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>
<?php $hidden="027";?>
<table width="220" border="1" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="index.php">
<tr>
<td width="151" align="center" class="style1">隐藏域的值 :<?php echo $hidden;?> <input type="hidden" name="ID" value="<?php echo $hidden;?>"></td>
<td width="60" height="25"><input type="submit" name="Submit" value="提交"></td></tr>
<tr>
<td height="25" colspan="2" align="center" class="style1">获取隐藏域的值:<?php echo $hiddens;?></td>
</tr> </form>
</table>
</body>
</html>
显示错误:一:Notice: Undefined variable: Submit
二:Undefined variable: hiddens
头两个程序就出现这种问题!请问下他的代码有没有问题?
<?php
if($Submit=="提交"){
$hiddens=$_POST[ID];}
?>
<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>
<?php $hidden="027";?>
<table width="220" border="1" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="index.php">
<tr>
<td width="151" align="center" class="style1">隐藏域的值 :<?php echo $hidden;?> <input type="hidden" name="ID" value="<?php echo $hidden;?>"></td>
<td width="60" height="25"><input type="submit" name="Submit" value="提交"></td></tr>
<tr>
<td height="25" colspan="2" align="center" class="style1">获取隐藏域的值:<?php echo $hiddens;?></td>
</tr> </form>
</table>
</body>
</html>
显示错误:一:Notice: Undefined variable: Submit
二:Undefined variable: hiddens
头两个程序就出现这种问题!请问下他的代码有没有问题?