0

I have a administrative panel where I just list, insert, edit, and delete news in my project.

But now, Im trying to list and edit text and images, of all my pages that I have.

But I never do this, and Im not see the best approach, or a good one, to do this.

For now I have a table in my database "pages", where I have a title and id of each page.

And then I have a list-pages.php file where Im showing pages that I have:

enter image description here

When I click in my pencil icon (edit icon) on id 2, Im open my page list-pages&idpage=2.

And now I neeeded to open a form specific for my page 2.

But now I'm not seeing how I can do this in terms of database. I have my table "pages", and when I click to edit a page, each page needs to open a different form, because pages are different, some pages have images, others don“t.

Can you please, give some tips on how I can arrange this? How can I can organize database to do this?

UserX
  • 1,295
  • 7
  • 25
  • 39

1 Answers1

0

What i do is design a landing for each section, ie: About, Blog, Gallery, etc. Each landing will have different options based on what the page you are editing needs to do (whether it has options for images, files, etc), and not only a table but a database for each. This obviously creates a lot more work, but allows for much more specific functionality based on what youre doing, and it limits the user to ONLY edit what they are ALLOWED to on the admin page for each section. Hope this helps.

Dustin
  • 147
  • 1
  • 1
  • 13