Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

PHP Form Development Best Practices

I'm looking for advice on Best Practices in form design for PHP. Do most people hand code each form that they build to interact with their database?

I have written my own object code to handle the display of the form, the CRUD and the validation. I am currently considering extending the functionality so that the parameters for each form and each control are stored in a database - and I'm wondering if that's normal, or if there is a better way to do it. Would it be advisable to use a framework?

My motivation is that I want administrators of my webapp to be able to choose an "Edit this list" option from any <select> which will pop up a modal form of the table for that <select> so that they can make additions/deletions and changes and I feel that the best way to manage that is by having the form created at runtime by pulling the parameters for the form from the database.


P.S. I expect that I will split points if I receive good advice from multiple experts :-)
1 Solution
Richard DavisSenior Web DeveloperCommented:
Seeing as PHPCake already performs dynamic form generation, customized validation and has a very solid CRUD design, perhaps this would be the best place for you to consider working out of.

There's nothing wrong with reinventing the wheel if doing so will yield a better performing wheel or you have found a way to make a square wheel not as rough of a ride, but overall, the PHPCake framework was developed by people that write this sort of code in their sleep and has a proven track record.

Hope this helped a little. :)


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now