I have a small program which HTML and javascript in front end and PHP backend. The javascript sends POST to PHP to create, update tasks. So i want to run the program locally as there are some issues to be resolved. However when i run, it does not do the create task and results in error:

IS there anything i need to do get this running. Thanks in advance. Edit: Adding a portion of javascript code to POST to php page:
$.post("model.php", {
            'task': 'write',
            'elementname': door
        }).done(function () {
            location.href = '?' + door;
        });
Installed XAMPP but getting the following error:

 
     
    