Function for simple math doesn’t work what am I doing wrong? [closed]

The correct syntax for switch/case is to have a colon : not a semi-colon ; after case, so…

case '+' :
    $result=$first+$second;
    break;

etc,

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)