i have one form which have some input box and some select box. i want to apply that nothing can be empty or blank before further activity, so i use below condition
foreach($_POST as $k=>$v)
{
if($v=='' || $v==NULL || empty($v))
{
$_SESSION['errMsg']=' Please fill all the fields properly';
header("location:somepage.php");
exit;
}
}
şimdi benim soru:
Yukarıda if yararlıdır ya da değil?
değilse o zaman hangi koşul boş girişi $v=='' veya $v==NULL veya empty($v) önlemek için yeterli değildir ya da ben bu koşulların hepsini kullanmak zorunda?
Şimdiden teşekkürler