有人可以帮助我解决这个问题,该问题表明致命错误:不能对表达式的结果使用isset()(你可以使用" null!== expression"而不是)我也可以使用如果条件很重要?
if(isset($_POST['dateLoanGrantedMonth']) && isset($_POST['dateLoanGrantedDay']) && isset($_POST['dateLoanGrantedYear']) && isset($_POST['maturityMonth']) && isset($_POST['maturityDay']) && isset($_POST['maturityYear']) && isset($_POST['expiryMonth']) && isset($_POST['expiryDay']) && isset($_POST['expiryYear']) && isset($_POST['mr']) && isset($_POST['mrs']) && isset($_POST['ms']) && isset($_POST['name']) && isset($_POST['resident']) && isset($_POST['loanInWords']) && isset($_POST['pesos']) && isset($_POST['interest']) && isset($_POST['daysMonths']) && isset($_POST['pesosInWords']) && isset($_POST['pesos2']) && isset($_POST['penaltyInterest']) && isset($_POST['itemType']) && isset($_POST['grams']) && isset($_POST['idPresented'] && isset($_POST['contactNumber']) && isset($_POST['birthdayMonth']) && isset($_POST['birthdayDay']) && isset($_POST['birthdayYear']) && isset($_POST['male']) && isset($_POST['female']) && isset($_POST['height']) && isset($_POST['weight']) && isset($_POST['citizenship']) && isset($_POST['complexion']) && isset($_POST['principal']) && isset($_POST['interestAbsoluteAmount']) && isset($_POST['serviceChargeAmount']) && isset($_POST['netProceeds']) && isset($_POST['perAnum']) && isset($_POST['perMonth']) && isset($_POST['others']))
{
$dateLoanGrantedMonth = mysqli_real_escape_string($connection, $_POST['dateLoanGrantedMonth']);
$dateLoanGrantedDay = mysqli_real_escape_string($connection, $_POST['dateLoanGrantedDay']);
$dateLoanGrantedYear = mysqli_real_escape_string($connection, $_POST['dateLoanGrantedYear']);
$maturityMonth = mysqli_real_escape_string($connection, $_POST['maturityMonth']);
$maturityDay = mysqli_real_escape_string($connection, $_POST['maturityDay']);
$maturityYear = mysqli_real_escape_string($connection, $_POST['maturtyYear']);
$expiryMonth = mysqli_real_escape_string($connection, $_POST['expiryMonth']);
$expiryDay = mysqli_real_escape_string($connection, $_POST['expiryDay']);
$expiryYear = mysqli_real_escape_string($connection, $_POST['expiryYear']);
$mr = mysqli_real_escape_string($connection, $_POST['mr']);
$mrs = mysqli_real_escape_string($connection, $_POST['mrs']);
$ms = mysqli_real_escape_string($connection, $_POST['ms']);
$name = mysqli_real_escape_string($connection, $_POST['name']);
$resident = mysqli_real_escape_string($connection, $_POST['resident']);
$loanInWords = mysqli_real_escape_string($connection, $_POST['loanInWords']);
$pesos = mysqli_real_escape_string($connection, $_POST['pesos']);
$interest = mysqli_real_escape_string($coonnection, $_POST['interest']);
$daysMonths = mysqli_real_escape_string($coonnection, $_POST['daysMonths']);
$pesosInWords = mysqli_real_escape_string($connection, $_POST['pesosInWords']);
$pesos2 = mysqli_real_escape_string($connection, $_POST['pesos2']);
$penaltyInterest = mysqli_real_escape_string($connection, $_POST['penaltyInterest']);
$itemType = mysqli_real_escape_string($connection, $_POST['itemType']);
$grams = mysqli_real_escape_string($connection, $_POST['grams']);
$idPresented = mysqli_real_escape_string($connection, $_POST['idPresented']);
$contactNumber = mysqli_real_escape_string($connection, $_POST['contactNumber']);
$birthdayMonth = mysqli_real_escape_string($connection, $_POST['birthdayMonth']);
$birthdayDay = mysqli_real_escape_string($connection, $_POST['birthdayDay']);
$birthdayYear = mysqli_real_escape_string($connection, $_POST['birthdayYear']);
$male = mysqli_real_escape_string($connection, $_POST['male']);
$female = mysqli_real_escape_string($connection, $_POST['female']);
$height = mysqli_real_escape_string($connection, $_POST['height']);
$weight = mysqli_real_escape_string($connection, $_POST['weight']);
$citizenship = mysqli_real_escape_string($connection, $_POST['citizenship']);
$complexion = mysqli_real_escape_string($connection, $_POST['complexion']);
$principal = mysqli_real_escape_string($connection, $_POST['principal']);
$interestAbsoluteAmount = mysqli_real_escape_string($connection,$_POST['interestAbsoluteAmount']);
$serviceChargeAmount = mysqli_real_escape_string($connection, $_POST['serviceChargeAmount']);
$netProceeds = mysqli_real_escape_string($connection, $_POST['netProceeds']);
$perAnum = mysqli_real_escape_string($connection, $_POST['perAnum']);
$perMonth = mysqli_real_escape_string($connection, $_POST['perMonth']);
$others = mysqli_real_escape_string($connection, $_POST['others']);
答案 0 :(得分:0)
你的代码太长了,你无法真正阅读它:
isset($_POST['idPresented']
错过了他的')'
所以更改
isset($_POST['idPresented']
加入isset($_POST['idPresented'])