Hi, This is an extremely simplified version of my code: function action($id) { if($id == 6) { // Sucess } else { // Error } } $id = 6 if(action($id) is error) { // Do something } else { // Do something } PHP: could someone complete that code for me. I hoppe it makes sence (If not please say )
function action($id) { if($id == 6) { return true; } else { return false; } } $id = 6; if(action($id)) { echo 'Success'; } else { echo 'Failure'; } PHP: The above will echo Success if your ID is 6 or Failure if the id is not 6.