chapt 7 modification
HI there,
I've been trying to modify the chapter 7 script to implement a simple web content management system where the site administrator can modify the content of the site - ie add/change images, text etc. I can get the uploading and renaming etc working but I'm struggling to workout how to reference the file name in order to permanently imprint the image on the (users version of the )page. If I use the $lastpicid variable once another image is uploaded it will show that image rather than the one I wanted to show. My thinking is I need to rename each image with a page reference and a new number (ie indexphoto 1, indexphoto 2, etc). Unless there's a much simpler way to do it that I haven't considered, the bit I can't get my head around is how to get the reference number to increment considering the auto_increment id in the database doesn't necessarily start at 1 (if items are deleted the auto increment keeps going from where it was last).
Any thoughts out there?
Thanks in advance.
|