Noob PHP
Posted: Mon Aug 31, 2009 8:24 pm
Hey guys, I am working on a simple CMS.
Currently, I have my pages in my SQL database in BBCode format. I am able to pull the code out of the database, parse it, and display it just fine.
I also have a simple news system that works the same as the pages.
Where I am running in to problems is making the backend.
Right now I just have a bunch of case statements which I plan on optimizing to be objects/functions like everything else.
But this is my first CMS from scratch and I was wondering if you could please point me in the correct direction as to where I could find some helpful advice on the structure that I should code this backend.
Right now the case statements call a function which renders a text area (for editing a page) and I pass in to it the page ID, current contents.
My main issue comes when I need to have multiple text inputs and making the query string to submit them dynamic so I can say... for the news ... have a title, news body, and news footer.
I would like to make this as dynamic as possible for future adding of thing like shopping cart items that need multiple fields, more fields for page contents, etc....
Currently, I have my pages in my SQL database in BBCode format. I am able to pull the code out of the database, parse it, and display it just fine.
I also have a simple news system that works the same as the pages.
Where I am running in to problems is making the backend.
Right now I just have a bunch of case statements which I plan on optimizing to be objects/functions like everything else.
But this is my first CMS from scratch and I was wondering if you could please point me in the correct direction as to where I could find some helpful advice on the structure that I should code this backend.
Right now the case statements call a function which renders a text area (for editing a page) and I pass in to it the page ID, current contents.
My main issue comes when I need to have multiple text inputs and making the query string to submit them dynamic so I can say... for the news ... have a title, news body, and news footer.
I would like to make this as dynamic as possible for future adding of thing like shopping cart items that need multiple fields, more fields for page contents, etc....