Hi All,
I've been writing a small script that is skinnable, and i've just managed to get it scanning new theme directories and adding them to the DB.
See this thread.
The directory scanning script passes the number of new directories found to my next page "Name themes".
As you can tell, it's a page for naming the themes! :rolleyes:
Anyways, the page knows that there are X number of new directories in the database. So i run this query:
"SELECT * FROM `iplayer_themes` ORDER BY `id` DESC LIMIT '$total'"
"$total" is the variable number. So this way i'm picking the last X results from the db?
Right, the next part, i generate a form field for each result using a while statement, and also bring the directory back for reference purposes (So the user knows what they're renaming).
The problem is, I only want the form to have the one submit button right at the bottom, but i want to submit all the fields.. This isn't a problem when i know how many fields i'm going to use, but what about when the number of fields is ever changing?
Liiittle bit stuck now! lol
Any ideas would really be appreciated.
Thanks,
Dave
P.S. If there's a cleaner way to pull the last X records back, let me know, i'm not too sure if that SQL statement is the best way! lol