shalli Posted March 12, 2011 Share Posted March 12, 2011 Hi there Just wanted to know what everyone here would recommend to a newbie in php about adding php code to mysql database and then retreiving it I would like to create a is a php template site that allows user to choose the template they like and once the user selects the template it takes the user to a page that shows template code. The page use php variables to display the code from the database. as an example it like dreamweaver which allow you to choose from a selection of templates when creating a website Hope this make sense thanks for you time shalli Quote Link to comment Share on other sites More sharing options...
djswebdesign Posted March 16, 2011 Share Posted March 16, 2011 Not sure if this is what you mean but I am pretty sure you could store an HTML template in a field in a mySQL database using BLOB as the data type. Quote Link to comment Share on other sites More sharing options...
Daim Posted March 22, 2011 Share Posted March 22, 2011 You can just store the HTML code in a TEXT field in your mysql database. When you echo the HTML code make sure you echo it in a textarea. In my opinion it would be alot easier, to make a system that allows users to upload a zip file and a screenshot of the template. Quote Link to comment Share on other sites More sharing options...
jenkyjay Posted March 30, 2011 Share Posted March 30, 2011 You can just store the HTML code in a TEXT field in your mysql database. When you echo the HTML code make sure you echo it in a textarea. In my opinion it would be alot easier, to make a system that allows users to upload a zip file and a screenshot of the template. Yeah the ZIP file and screen shot would be pretty good idea. If not, yeah, store it as a text. And just pull the data when necessary. Quote Link to comment Share on other sites More sharing options...
Ionisis Posted March 30, 2011 Share Posted March 30, 2011 why don't you just readfile() the flat files? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.