8

when you build the whole landing page, forms, php mail sender, SMTP, marketing integrations, analytics and all of that from scratch, and 1 hour before it goes live your boss tells you to change some inputs on the form.

Comments
  • 3
    Build a self-validating form script that loops through all fields and validates. Create simple PHP variables for recipients and subject. Field names are added to two arrays: expected, and required. Only the expected fields get processed and the required fields are defined.

    Adding and removing fields becomes cake and you can reuse the script.
  • 1
    Like @noonesboy said, arrays and foreaches son, learn them!
Add Comment