Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
04-07-2013, 11:09 PM #1
- Join Date
- Jan 2013
- Thanked 0 Times in 0 Posts
How to Physically change html doc text from outside
I have an html5 doc (webpage) that has a series of list items, each li has an image and descriptive text. lets say i have 20 of them. if i need to replace one, it is awkward to go searching for it, and then change the text relating to the new image and new description (and prone to mis-typing).
i have successfully changed it using innerHTML, but that is a temporary change. when i re-open the document, there is the old information.
any suggestions ? (i hope i won't involve learning mySequel).
04-08-2013, 01:04 AM #2
- Join Date
- Mar 2013
- Thanked 9 Times in 9 Posts
A much better way is to do this server side. Whether you use PHP or some other language, the concept is exactly the same.
Generally you would use a CMS (Content Management System), which uses a database to store the website content and other stuff. It would be fairly straight forward to create your own CMS, in PHP, for editing your lists. But since you're not keen on learning MySQL, plan B could be to have a 2D array at the top of your web page to store all your lists' content and then use PHP to create the html for the lists by looping through the 2D array. So effectively, the 2D array basically replaces the database.
So whenever you want to change the content of the lists, you simply just edit the 2D array's content at the top of the web page.