我有一个 if else 语句,但它不能正常工作。当我添加它时,即使数据库信息与=
if 语句中的不匹配,它也只会回显第一个语句,我做错了什么?
$gameum = $db->fetch("SELECT * FROM accounts WHERE `id` = '$id'");
$status = $gameum['status'];
$gameid = $gameum['gameid'];
$search = $gameum['seraching_for'];
if($gameum['status'] = '0' ) {
$data ='<h1> Who do you want to battle against? </h1><br />
<form action="" method="post" id="form-pb" name="pb" target="_self" >
USERNAME:<input name="name" type="text" size="40" maxlength="40" />
<input name="submit" type="submit" value="Search"/>
</form>
<a class="goback" href="#">Cancel</a>';
} else {
$data = '<h1> Searching </h1> <br /> Searching for '.$search.'';
}
数据库行截图: