added addPillLog logic to addLog.php