I have the following array
Array ( [productid] => 3
[newid] => 3
[name] =>
[description] =>
[price] =>
[onlinestock] =>
[weight] =>
[keywords] =>
[longdescription] =>
[graphic1] => 89.jpeg
[graphic2] =>
[parameter1] =>
[parameter2] =>
[category1id] => 101
[category2id] =>
[category3id] =>
[category4id] =>
[category5id] =>
[extra1] =>
[extra2] =>
[extra3] =>
[group1id] => 1575
[groupprice1] => 0
[group2id] => 1576
[groupprice2] => 0
[group3id] => 1577
[groupprice3] => 0
[group4id] => 1578
[groupprice4] => 0
[group5id] => 1579
[groupprice5] => 0
I'm doing the following to check for empty values
if (empty($_REQUEST["category1id"])){
$_REQUEST["category1id"] = 0;
}else if (empty($_REQUEST["category2id"])){
$_REQUEST["category2id"] = 0;
}else if (empty($_REQUEST["category3id"])){
$_REQUEST["category3id"] = 0;
}else if (empty($_REQUEST["category4id"])){
$_REQUEST["category4id"] = 0;
}else if (empty($_REQUEST["category5id"])){
$_REQUEST["category5id"] = 0;
}else if (empty($_REQUEST["price"])){
$_REQUEST["price"] = 0;
}else if (empty($_REQUEST["onlinestock"])){
$_REQUEST["onlinestock"] = 0;
}else if (empty($_REQUEST["weight"])){
$_REQUEST["weight"] = 0;
}
but somehow it's not detecting any of these values as empty? I'm not sure what this could be I tried $_REQUEST['category1id'] == "" and that also is not working. Any help would be appreciated
$_POST, not$_REQUEST.