if (!(isset($_POST['fullname']) && strlen($_POST['fullname']))) {
echo
"<script type=\"text/javascript\">".
"window.alert('You must enter your full name.');".
"</script>";
exit;
}
上面的代码在
register.php
文件中。我在index.html
中有一个html表单。当我提交没有full name
的表单时,它会显示alert
但是页面卡在register.php
(空白页面)。
我想在index.html
页面上显示alert
或者至少重定向到index.html
。
怎么做?