prepare($sql); if( !$stmt ) { exit('wrong'); } $stmt->bind_param('ssssi', $identical, $motivation, $company, $realname, $uid); $stmt->execute(); $stmt->store_result(); if( $stmt->affected_rows === 0) { exit('wrong'); } //设置session为company变量 $_SESSION['company'] = $company;$_SESSION['realname'] = $realname; exit('true');