PHP Form Validation and Sanitization Guide
How to validate and sanitize PHP form input: trim, filter_var, mb_strlen and allow-lists, then escape output with htmlspecialchars, add CSRF and redirect.
Notes
Security notes, SOC lab write-ups and tested code by Mahir Faysal, a SOC Level 1 cybersecurity learner in Bangladesh, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.
How to validate and sanitize PHP form input: trim, filter_var, mb_strlen and allow-lists, then escape output with htmlspecialchars, add CSRF and redirect.
Python list comprehension examples I actually use: basic syntax, filtering with if, if/else, nested loops, dict and set comprehensions, and common mistakes.
Python f-string formatting examples for decimals, thousands separators, percentages, alignment, dates and = debugging, plus what's new in Python 3.12 and 3.14.
HTML semantic tags explained with examples: header, nav, main, article, section, aside and footer, when to use each, and the div mistakes to avoid.
HTML input types and built-in validation attributes (required, minlength, min, max, step, pattern) with examples tested in Chrome, plus :user-invalid styling.
CSS position explained: static, relative, absolute, fixed and sticky, why absolute needs a relative parent, why sticky stops working, and how z-index stacks.
0%