尝试将一些稍微棘手的表单验证(在本例中用于复选框)与网球锦标赛的注册表单相关
<?php
if ( ( isset($_POST['ms'])&&isset($_POST['ws']) )
|| (isset($_POST['mc'])&&isset($_POST['ws']))
|| (isset($_POST['md'])&&isset($_POST['ws']))
|| (isset($_POST['ms'])&&isset($_POST['wc']))
|| (isset($_POST['ms'])&&isset($_POST['wd']))
|| (isset($_POST['mc'])&&isset($_POST['wc']))
|| (isset($_POST['mc'])&&isset($_POST['wd']))
|| (isset($_POST['md'])&&isset($_POST['wd']))
){
$error_message .=('You can only play as one sex! <br />');
}
if ( (isset($_POST['mc'])&&isset($_POST['md']) ) { //***
$error_message .=('You cannot play in both the cadet tournament and mens doubles <br />');
}
但是,这会导致带有三个星号的行出现解析错误。
意外的'{'
大概我做错了什么,不是在使用大括号,而是在使用圆括号......但我看不到在哪里......