Feather.php – Making form to database interactions easier

More often than not, when I’m doing form to database interactions, I use the same field names. This means there is some redundant information in my code, making my job more difficult. As such, I’ve started to create feather.php, a SQL statement constructor class that works off data sent by the $_POST or $_GET arrays.

It’s not ready for a public release as there are still some security issues to address (see TODO) but I wanted to get some thoughts, opinions and suggestions on this.

For those of you concerned about using the same field names as database columns, I plan to add associative arrays to allow you use different names.

i.e. something like this:

$field_names array('the_first_name','the_last_name','the_zipcode');
$column_names = array('first_name','last_name','zipcode');
Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • blogmarks
  • BlogMemes
  • Furl
  • NewsVine
  • Reddit
  • SphereIt
  • Spurl
  • StumbleUpon
  • Technorati
  • YahooMyWeb

1 comment so far

  1. Matteo April 9, 2008 4:37 pm

    Wow! this is brilliant! I was working on something like this but using dynamic variables. The code works but it’s pretty messy. Let me know when you publish a download version of your code.
    Ciao from Rome Italy!

Leave a comment

Please be polite and on topic. Your e-mail will never be published.