I’m not sure how to call this kind of form style, it is pretty common on paper forms, but super rare to find on the web: In fact, I have only seen it once on Condé Nast Traveler website many years ago, but to my disappointment it was just an image, not an actual form…
Month: March 2023
PHP: Reading JSON from Javascript Fetch API and Axios
If you tried to send a POST request by following tutorials of the new Fetch API in Vanilla JS, or if you use Axios, which sends form data in JSON format by default, you might be surprised that $_POST is empty, the entire JSON data is missing. This is because PHP only reads the form data in url-encoded format: What…
Some Simple PHP Functions that I Find Useful
I’ll keep this list updated. stop() We use this function to gracefully stop the program in place of exit. We used to close all DB connections within this function, but it’s seemed no longer required to close manually, so sometimes we just do some data logging here. is_num() and is_id() It’s funny that in PHP, most…