Hello all I'm quite new to php and have been playing with basic php for a while. I'm currently building a new site for someone, and have decided that for future updates i'm going to have to learn php in more depth. I'm fluent in html 4 and CSS2 and hand code everything i build to be standards compliant, so should understand most things. I'll explain my problem, and then hope what i want to achieve is not the hardest thing in the world, although i'm probably way wide of the mark on that front! The site has a list of properties/houses, this list updates almost daily, but the owners of the site will eventually need some kind of admin front end system. The site is built using lots of php includes and the list is made up of 4 include files, we'll call them 1bed.php, 2bed.php, 3bed.php and besthouse.php. Within these files is html code as below. This is repeated for each property in each include. The anchors and images are different for each house, but the code remains the same. <div class="propertybox"><a href="http://domain.com/houseforsale.php" rel="nofollow"><img src="http://domain.com/images/houseforsale.jpg" alt="house"></a> <h2><a href="http://domain.com/houseforsale.php">1 Bed house for sale</a></h2> <ul> <li>Clean 1 house for sale blahblah bla blah blah</li> <li>Available to buy now £1000000 blahblah bla blah blah</li> <li><a href="http://domain.com/houseforsale.php" rel="nofollow">Read More</a></li> </ul> </div> Code (markup): What i want to do, is create a form on a seperate page, whereby, the visable details, between the html tags, can be entered into a form and have the php include files update. It also needs to create a page for each house, insert the code above into a specified place within a page template and then create a url for that individual property, although the url itself would ideally be specified within the form. This entry form needs to display all current houses and have a tick box, or the like, next to it to be able to remove a house should it have been sold. I imagine it can be done, but i just want someone to confirm it can and how much i will have to learn, or whether i'll have to pay a coder to write it for me. I appreciate i could probably use a sql db, but feel, perhaps wrongly, that to do this by entering details into a form, which writes to a file, which is then automatically copied to the php includes would be easier. It also means my html remains clean and seo friendly although this might not be effected? I don't even know whether i'm right or wrong as i've made some assumptions. Any advice would be appreciated. Thanks
As I understand you post, what you do now is have the info in files. It would be much easier if you had the info for each house in a database. This doesn't sound like a big project. Oh, and you'r html need not be touched as in a database you save only the information about the houses. Not how they are presented, that is html's job. If a house has a name shown like this: <h1>Ron's House</h1> The only bit you save in the database is "Ron's House" and then use PHP to fetch that information and put it in between the h1-tags.
That's what i was hoping, thanks. With that it obviously means any files where said house needs to be displayed, it ca be called up using tags/code. Can an admin system be easiily created which enters info into the database and can be used to read and edit the information? I will have to look into this sql malarkey and see how hard it is, or start to try and find a coder! Thanks