Web Development
JSON decoding can fail because a request is malformed, and encoding can fail because a value cannot be represented as valid JSON. If a program ignores...
HTML can catch several common form mistakes before a request is sent. The browser can tell a user that a required field is empty or that a value does ...
When filter_input() returns NULL, it is tempting to treat the value as an empty string or a failed validation. Those are different states. A missing i...
cURL error 60 means certificate verification failed during a connection. In WordPress it may appear while contacting an update service, payment provid...
A file extension tells you what a file is intended to contain; it does not tell you whether the export is suitable for your website. A tiny PNG can be...
A small HTML table does not need a search library. Read the search field, compare it with the loaded rows and hide rows that do not match. The importa...
Tabs let related sections share the same area of a page. They work well for short alternatives such as an overview, installation notes and examples. T...
A modal is useful when a short task needs the reader's attention without leaving the page. A dark overlay alone does not make a component modal: keybo...
PHP's built-in functions can reduce repetitive code, but misreading a return value introduces new bugs. Distinguish validation from sanitization, and ...
Do not choose a form control only by its appearance. Decide whether the user should send one value, a longer explanation, or one of a fixed set of opt...