I am new to the site - and PHP, though I have been studying PHP and MySQL for nearly 2 years.
I have a project I need to complete and If I can get a little nudge in the right direction...
I maintain a site for an animal rescue -
www.theadweb.com/wilson - and I do all the updates as the pets are added and adopted.
I need to create a new site along the same display theme - individual display boxes - where the client can log on and add, delete and edit the pets as necessary...
I can see where PHP and MySQL are going to be a great help in this, but what is the best approach to the client manage side?
My first thought â the client logs in and has the necessary permissions. This is a /manage.php page on the site.
The manage page has the ADD / UPDATE options.
The ADD button is for a new entry, bringing up a new ADD page with a .jpg upload, a place for text, header, ADD button etc. The ADD button sends the info to the db and creates a new record.
The UPDATE choice pulls up a name list of the pets currently in the db through a for while loop and the name list is selectable. (how do the names become selectable â an iteration drops them into a form field?)(I could also make it a name entry and call the record that way... I prefer the former "select" option...)
Selecting the desired pet calls the record and displays the appropriate text box with the descriptive text available for editing â again â inputing into a form? I imagine this is all done on a separate page from the original EDIT page, with inserts into form fields...
An UPDATE button uploads the changes made to the text into the db and updates the record.
Meanwhile, once a pet is selected for edit, a DELETE button appears. Changing pages again? Clicking the DELETE deletes the record and displays another page... "success" another page?
So â The confusing part â not that I am all that clear about what I just said â this is all just theory for me at this point.
On the display page â the one the site visitor views when coming to the site, PHP calls the MySQL SELECT to display the data from the db - all the pets in their display boxes. But how does the <div> layout / propagate the individual pet display boxes? I believe it is through the âinclusionâ call of the <div> / <table> layout / format from the inclusion file and a while loop / iteration places the db text in the appropriate places while generating the various boxes, and the image name from the db image field calls the appropriate .jpg from the image file?
...or something like that?
If I can just figure the manage side out I can do everything I currently have in view to accomplish with MySQL and PHP.
Thanks in advance for your help!!
David