ACM Editorial · 2026-11-28 · 1 min read
Create PHP applications that validate inputs, protect user sessions and handle data consistently.
Validate on the server
Browser validation improves usability but can be bypassed. Check required fields, input lengths and permitted values on the server. Escape untrusted output for its context and avoid constructing SQL from submitted strings. Use parameterised queries for database access.
Protect state-changing actions
Use CSRF protection on forms, secure session cookies over HTTPS and password hashing with supported algorithms. Check authorization for each record rather than relying on hidden buttons. Restrict uploads to expected formats and keep private documents outside the public root.
Separate calculation from presentation
A quotation form can display an estimate in JavaScript, but the server should calculate authoritative totals using decimal or integer minor units. Save document snapshots, apply transactions to related changes and test rounding, discounts and duplicate requests.
Discuss your project
Use the checklist above to scope the work, identify dependencies and agree on the testing and delivery requirements before requesting a quotation from ACM.

