Hi,
Here's what I'm attempting to do: My site has a section on the index page that showcases six "weekly winners". Rather than querying static info all week, I manually open the file in Dreamweaver and swap out all of their info such as name, location, picture, etc. I'm trying to automate this process so I cut the section out of the index page and pasted it into a seperate file to be used as an include. I also setup a small table to store the weekly winner info after a query determines them.
I then created a clone of the include for processing the html. Basically I just replaced all of the actual data with echo statements from a query to the weekly_winner table so that when I view source I have the exact code I'll need to copy and paste into the "real" include. It also gives me a chance to preview the next week's lineup before it goes live. I guess you'd say it's my ghetto version of Smarty which I have dubbed Dummy.
There's just one last step. How can I automate it so that if I approve of the preview; I hit "submit" and it rewrites the current weekly_winners_inc.php with the info being output by the browser? It occured to me that the submit button and form code would need to somehow be excluded unless I previewed in a pop-up and used a submit button on the main page. From there I have no idea how to tell it to "use the code that page over there outputs when processed". I'd at least like to be able to copy and paste the code into a text area on that same page and submit it that way. Any help?
Oh, and one last thing. I have the images for this section stored in a folder and named winner1.jpg, winner2.jpg...etc. In order to preview without overwriting the current files I use a subfolder called temp. Can anybody please tell me the syntax for "Taking all of the images in this folder and putting them in that folder while overwriting the current?"
Thank you very much.