Hi guys,
Over the last 6 months I have been maintaining a horse classifieds site. The site was built by someone else (and the design is terrible), but I am in charge of adding new advertisments to it and other content when needed. It's a basic
html site and over the last 6 months I must have updated it about 6-7 times and charged about $200 each time. I've told the owners that if it were created with a database backend, it would save them a lot of money as they could update the content themselves. They were really interested in this idea and want me to go ahead and create the new site. So here is how I plan for it to work:
The basic design is built and all looks the same. There will be a login for the admin.
When the admin wants to add new advertisements, they fill out a form. The form has set fields in it eg. Type of horse, age, sex, height, etc. It will also have 2 file uploaders, for images. Once the form is completed and submitted, the idea is this:
I have set templates already created, these templates will be opened and editted via
php, and the field data inserted at certain points within the template code. The template will then be saved as a
php file with a filename worked out from the form details (eg a spanish colt will get the filename adSC001.
php, with the next spanish colt getting adSC002.
php etc). The database table that contains the listings will then be updated with the new page link and title.
I may even make it so that people wanting to place ads can fill in the form themselves, with the admin approving their ads after payment is received and the ad is approved by them.
So, with all the knowledge thrown around in this forum, can you guys have a think about what I have just explained above and tell me if there is a better way of doing this? Or if you can see any problems with it working this way?
Also, is it even possible to do it this way? I mean, I know I can edit the contents of a file using
php, but can I insert in certain areas of a file as I have explained?