동일한 프로젝트에서 "catalog.php"라는 다른 파일에 의해 정보가 입력되는 프로젝트에 대해 shoppingcart.php 파일을 만들고 있습니다. 내가 붙어있는 건 while 루프 안에있는 if 문이다. (이것은 catalog.php에서 들어오는 폼 데이터를 통해 반복해야한다). 웬일인지 다음과 같이하지 않습니다.하나의 if 문에서 다중 검사를위한 PHP 구문
//Loop through each form field (this page is called from catalog.php):
//If form field’s value (product quantity) is a positive number
//(nonzero), is NOT the submit button, AND the remove checkbox for
//removing this product has NOT been checked (do these checks in one
//condition):
while (list($productID,$qty) = each($_POST)){
if(($qty > 0) && (type != submit) && (checkbox != isset())){
}
}
if 문에 어떤 문제가 있습니까?
오류 메시지가 무엇입니까? – Jocelyn
'$'없이 변수가 있습니까? –
(type! = submit) && (체크 박스! = isset()) 무엇입니까? – qisho