Quickly: PHP Form Handling
server side form processing & superglobals
Reacquaint with The Image Store project
We made AJAX requests, remember? GET and POST.
Some Security Reminders for All Form Handling
- Do you need to vet the origin of the request?
- Compare variables passed to variables expected.
- Input is being sanitized? Special chars?
The Stateless nature of HTTP requests
The server never remembers you.
Sessions solve this problem for us.
A few Superglobals in PHP:
These never have to be declared.
These are available on any line of your code.
Let's look inside get-api.php file
Let's look inside post-handler.php file
Points of consideration
Our form doesn't work without Javascript enabled
Our API key is pretty weak
Steps in between receiving order and giving receipt?
What Next?
- var_dump($_GET) and see what happens
- Handle some forms and get some webdev magic going
- Give me a high five -
Github stars, upvotes, emails, shares, comments all welcome.