CodeIgniter Forums
best practices - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: best practices (/thread-55921.html)

best practices - El Forum - 11-16-2012

So admittedly I am a PHP noob as I may have mentioned in a few of my other posts.

I am currently trying to learn PHP from using codeigniter to build my own personal page... well website. I am wanting to build a fully functional Admin Panel so that I can post blogs, news, etc from a web interface.

I am in the works of laying out the Admin CP and realized I ought to ask this question BEFORE I get too far along.

which is better practice?

building a form to write data to a blog table on my data base and another form to write news data to a table on my database


has one from right to an articles table on my data base and have that data given a value of 'category:blog', 'category:new', etc and have my display pages set to pull all info from the article database under 'category:x'. eg my blog page pull data from the article table in my database that has a category value of blog. This is how Joomla works and I believe wordpress as well.

best practices - El Forum - 11-16-2012

That's up to you. It depends how similar your database tables are for your articles. If blog articles have specific info that news articles don't (and vice versa), it might not be worth combining them.

I'd suggest keeping them separate for the time being. Focus on learning simple things first. If you overthink everything at this stage, it'll take forever to learn.

best practices - El Forum - 11-16-2012

Yeah at first I thought combining them would be the easier route until I realized I might actually have to make a whole different section just for making categories and some how link those categories with a weight value on the initial article db. I think I will stick to separate DBs for now.

Now I need to figure out how to open certain forms via clicking a link without having to make a new page for each section . I know usually making a new page is preferred because of SEO and meta data etc. but this section doesn't need to be indexed for SEO its all my admin CP.

basically on click link-X show form-X, on click link-Y show form-Y.