当字段为空时,我正在使用这段代码显示错误,但它只是将我返回到该位置。
$err = array();
if(empty($native) )
{
$err[] = "ERROR - Enter Native Language";
//header("Location: language.php?msg=$err");
//exit();
if(!empty($err)) {
echo "<div class=\"msg\">";
foreach ($err as $e) {
echo "* $e <br>";
}
echo "</div>";
}
有任何想法吗?