php

  • PHP Query SQL Database return JSON Dec 27 2017
    As a Javascript developer, I always prefer to use NodeJS as my API endpoint when interacting with a backend database. Unfortunately, it’s not always feasible to use NodeJS (especially in a shared hosting environment) and you might have to fall back to good old PHP. So here’s a quick refresher on how you can perform queries to a SQL database using PHP from an Ajax or Fetch call. Fetch Call Suppose I have the following XMLhttp request using the fetch API:

  • Raspberry Pi Webserver May 07 2017
    One of the reasons that I purchased a Raspberry Pi was so that I can do local website development. Of course, I could have easily set this all up with Windows, but my desktop is already cluttered enough. And with a Raspberry Pi Webserver, I can set up scipts to run independently of my desktop. Here’s how to setup a Raspberry Pi Webserver What You Will Need: Raspberry Pi Setup Static IP Address It would be very annoying to have a website that always changes its address.