June 23, 2009 | Posted in PHP
PHP Menu Builder is a new class I just finished that allows you to easily build out a navigational menu. It outputs as an unordered list, and allows for as many levels as you want.
You can add any HTML attributes to the main list, and sub-levels and active items are given classes according to their place in the list.
View Demo & Documentation
May 12, 2009 | Posted in Javascript, PHP
When creating forms that need to be validated against a user's input, you can either validate on the client-side (Javascript), or the server-side (PHP in this case).
But if you want to use Javascript, then someone with Javascript turned off could easily submit the form and bypass all validation.
That's where AJAX comes in. You do all the validation on the server-side, but return the results back to the user with Javascript and no page refreshes. It's really the best of both worlds. Plus it degrades good enough if someone has Javascript disabled.
May 6, 2009 | Posted in HTML, PHP
This tutorial will explain how to get the data from a submitted form, create a PDF from that data, and then attach that PDF to an HTML email and finally send it. We will be using dompdf for the PDF generation, and Swift Mailer for sending the email.