每次输错都没提示?? 是为什么呢? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<a href="./">返回列表</a><form method="post" action="<?php echo $PHP_SELF; ?>">
<input type="text" name="date" value="<?php echo $date; ?>"/>
<input type="submit" value="转换" />
当前时间 <?=$_POST[date]?>
</form><?
$email=$_POST[date];
if(isset($_POST[date]))
{ if ( ereg("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9\-\.])+", $email))
{
echo "输入正确";
}
else
"不对<br>";
}?>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<a href="./">返回列表</a><form method="post" action="<?php echo $PHP_SELF; ?>">
<input type="text" name="date" value="<?php echo $date; ?>"/>
<input type="submit" value="转换" />
当前时间 <?=$_POST[date]?>
</form><?
$email=$_POST[date];
if(isset($_POST[date]))
{ if ( ereg("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9\-\.])+", $email))
{
echo "输入正确";
}
else
"不对<br>";
}?>
</body>
</html>
$email=$_POST[date];
if(isset($_POST[date]))
{if ( ereg("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9\-\.])+", $email))
{
echo "输入正确";
}
else
{
echo "不对 <br /> ";
}}?>
你马虎了而已。
{
echo "不对 <br /> ";
}
<?
$email=$_POST["date"];
if(isset($_POST["date"]))
{
if ( ereg("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9\-\.])+", $email))
{
echo "输入正确";
}
else
{
echo "不对<br /> ";
}
}
?>
$email=$_POST[date];
这句话是什么意思?测试email的正则测试时间,要是提示对了,我还真想见识见识