0

我有一张表格,我需要填写一个字段。我正在尝试但没有任何成功。

请指出我做错了什么。

if($text1=='' && $text2=='' && ($text3!='' || $text4!='' || $text5!='' || $text6!='')){

                    $abc->redirect('../xxxx.php');  
                    exit;

                    }


<tr>
<td>title: $</td>
<td><input type="text" id="dailyprice" name="text1" style="height: 25px; border: 1px solid #888; width: 80px;"></td>
<td>Desc: $</td>
<td><input type="text" id="weeklyprice" name="text2" style="height: 25px; border: 1px solid #888; width: 80px;"></td>
</tr>

<tr>
<td>Daily Price: $</td>
<td><input type="text" id="dailyprice" name="text3" style="height: 25px; border: 1px solid #888; width: 80px;"></td>
<td>Weekly Price: $</td>
<td><input type="text" id="weeklyprice" name="text4" style="height: 25px; border: 1px solid #888; width: 80px;"></td>
</tr>
<tr>
<td>Weekend Price: $</td>
<td><input type="text" id="weekendprice" name="text5" style="height: 25px; border: 1px solid #888; width: 80px;"></td>
<td>Monthly Price: $</td>
<td><input type="text" id="monthlyprice" name="text6" style="height: 25px; border: 1px solid #888; width: 80px;"></td>
</tr>

谢谢

4

2 回答 2

0

如果我理解正确,然后尝试这样的事情。

if ((empty($text1) && empty($text2)) || (empty($text3) && empty($text4) && empty($text5) && empty($text5)) {
     $abc->redirect('../xxxx.php');
     exit();
}
于 2012-07-16T22:59:13.960 回答
0

试试这个

if(isset($text1)== True && isset($text2)== True)) || (isset($text3)==True xor isset($text4)=True xor isset($text5)==true xor isset($text6)==true)
于 2012-07-16T22:59:14.253 回答