This seems like a pretty big project. But there are some useful tools or apps that have been developed already doing these types of things... such as: http://www.phpguru.org/static/TableEditor.html Possibly this could be used and modified to fit your needs. Have you started anything at all? Are you using a framework (like Zend... which has a lot of built in classes already done for you)?
Some more info may help you get some more answers. I hope you can figure this out. :-)