<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>
统计帖子标题长度
</title>
</head>
<body>
<?php
$str = <<<mark
<form name="fm" method="post">
标题:<input type="text" name="tt"></input><br>
内容:<textarea name="ctent" rows=4></textarea>
<input type="submit" mame="sub" id="sub" value="发布"></input>
</form>
mark;
echo $str;
if(isset($_POST['sub'])){
$len = strlen($_POST['tt']);
echo "<br>帖子标题长度为:".$len."个字节<br>";
}
?>
</body>
</html>
就是没有输出……我晕了,程序应该没问题啊。
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>
统计帖子标题长度
</title>
</head>
<body>
<?php
$str = <<<mark
<form name="fm" method="post">
标题:<input type="text" name="tt"></input><br>
内容:<textarea name="ctent" rows=4></textarea>
<input type="submit" mame="sub" id="sub" value="发布"></input>
</form>
mark;
echo $str;
if(isset($_POST['sub'])){
$len = strlen($_POST['tt']);
echo "<br>帖子标题长度为:".$len."个字节<br>";
}
?>
</body>
</html>
就是没有输出……我晕了,程序应该没问题啊。



