A more ecconomical way with control statements??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



if (empty($samosa)){
// do nothing

}

else {

setcookie("cookie[samosa]", "$samosa");

}


if (empty($pakora)){
// do nothing

}

else {

setcookie("cookie[pakora]", "$pakora");

}


It goes on like this for the whole menu I am looking for a more effiecient 
way to do this. The inputs are text boxes taking values from 0-9.

Thanks



Ross 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux