Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Nov 2006
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Display entire table and edit?

    Is it possible with php to write a page to display and entire table into text boxes that will allow the user to edit the values in the text boxes and then click a single button to overwrite any changes? Currently I have the users using a formatted excel spreadsheet to modify the table entries but I would like to php it.

    I was going to use something like this, but I would prefer to be able to edit the table inline with the display rather than having the user have to select the line entry and edit it in a second page.

    http://www.phpguru.org/static/TableEditor.html

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    of course that is possible. i don't really see what the problem could be...
    i 'm not exactly sure what info you're expecting from us, but i've written pages that do such updates (only updating changed records) so i definitely know it's possible, and not even that hard to do.

    you just need to make sure that the formfields are elements of a 3d array where the 2d elemenetskey = the PK from the table and the 3d elementskey is the columnname.
    you then store the 'old' values in a sessionarray with the same structure, and when you run through the post-collection, you compare the posted values with the corresponsing element from the sessionarray. if they are changed, you update the record.

    it get's slightly more complicated if you don't want to reveal your tablestructure through the formfields, but it's still not that hard.

    i could write it for you in under an hour, and it would cost you $100.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •