SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Does An Application Like This Exist?

    I am wanting a online form that would allow a user to create, edit and delete an entry item that would submit to an XML document. For example, if I have a Spry dataset that is displaying the contents of an XML file lets say members of an organization, the client could access a page that contains each member. They could then click on a member to edit the members information, create a new member or delete a member. The form would then collect the changes and save them to the XML which is binding to the Spry data table.

    Does this type of application already exist? If so, what is it called and how do I find it? Or is there a tutorial on how to do this?

    Thanks in advance!

    Todd
    Todd Temple > T2 Design

  2. #2
    SitePoint Guru bronze trophy TomB's Avatar
    Join Date
    Oct 2005
    Location
    Milton Keynes, UK
    Posts
    989
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    It wouldn't be hard to make something like this, however using XML you will have issues with concurrency and synchronisation. You would have to (at minimum) implement some kind of file locking which stops the file getting written to when it's in use.

    For example, take this scenario

    User A opens the file
    User B opens the file
    User A updates the member's password
    User B updates the member's date of birth
    User A saves
    User B saves

    Whose changes get saved? Without any inbuilt controls, User A's changes would be overwritten by User B.

    With a flat file format like XML, you'll need to put a write lock on when User A opens the file, and not release it until User A closes the file, meaning that while User A has the file open, User B can only view the contents.

  3. #3
    Non-Member adstiger's Avatar
    Join Date
    Nov 2008
    Location
    Canada
    Posts
    348
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here is the php form editor description:

    http://www.adguru.org/php-mysql-f15-...or-t24204.html

  4. #4
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by adstiger View Post
    here is the php form editor description:

    http://www.adguru.org/php-mysql-f15-...or-t24204.html

    Very nice! I was able to make it work, even though I am a complete beginner at creating a database and adding a table to that database... but I think I got it. I thought that you had to have a field for a unique id with all databases? When I added a unique id column it kept showing up in the results which is not what I wanted. So I edited the structure of the database table so that it did not have a unique id field. I gave a primary key to another field which would have a unique name or number and it seems to work.

    I also had a question about how to hide the editing features from a public visitor and store the editing features somewhere else, but I think I have fixed that as well. I simply copied the same PHP document that it wrote for me and removed the editing features from the code. It seems to work but I thought there might be an easier way.

    Do you know if there are existing features for storing the admin features separately like in a password protected area so an admin would need to login? This feature should be mandatory in my opinion.

    Thanks so much for showing me the link!!!!!!

    Todd
    Todd Temple > T2 Design


Bookmarks

Posting Permissions

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