delete php logic