Click here to Skip to main content
15,921,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a cms with some page for the users to alter the pages but I want to let the user that can Add new Html page in his/her site and put data in that how can I do this with php?
any idea?
Posted

1 solution

Usually you'd have a page that's driven by the database, and shows whatever content the user added, which is stored in the dB. This is a much nicer design than letting users create HTML pages in your file system. So, you'd have a page called custom.php, say, and urls like custom.php?id=47, where 47 is the id that uniquely identifies the content in the dB. You'd want to check that this item was added by the logged in user, if the items are to be private. This is also more easily managed when it's all in the DB.
 
Share this answer
 
Comments
sadegh_sh 28-Aug-12 11:23am    
I know how select content from db but what I want is that my user create a page hisself and then put content from database in that page
Christian Graus 28-Aug-12 11:27am    
Let them create a template that includes keywords that you fill from a DB call. Then it's still one page, with a template in the DB.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900