<?php
include('Smarty-3.0b8/libs/Smarty.class.php');
$smarty = new Smarty;if( isset($_POST['name']) && isset($_POST['password']))
{
echo $_POST['name'];
}$smarty->display('a.html');
?>
a.html<form action="a.php" method="post">
<table>
<tr>
<td>姓名</td>
<td><input type="text" name="name" id="name"></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="password" id="password"></td>
</tr>
<tr>
<td colspan="2"><input type="submit"  value="Click!"></td>
</tr>
<table>
</form>
RT。我就填写了姓名  密码没填 点击提交。居然还把我姓名输出了!!
isset不是检测变量是否设置么