小编Ste*_*nes的帖子

需要php表单来命名哪些必填字段尚未填写

我的php表单包含必填字段,但该消息不会让用户知道哪个字段尚未输入.我怎样才能做到这一点?

//if statement to check required fields
if ($name && $phone && $email && && $address && $city && $state && $zip && $month && $date && $year && $contact)...
    //if some required fields were not filled out
    echo "Please make sure you fill in all required fields<br>Click <a href=\"javascript:history.back(1)\">here</a> to return to our form.";
}
Run Code Online (Sandbox Code Playgroud)

php forms

2
推荐指数
1
解决办法
1722
查看次数

标签 统计

forms ×1

php ×1