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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I need a bit of help

    Im im currently voluteering making a website for UK Scouts and im stuck on how to do one thing.
    I want it to be possible for leaders to open up records for each child and edit them. I have this made up in a folder, however..
    Before you get to this section i want it to be possible to Add a new child (without using sql). When i click on Add Child for example i want the folder with a sample record form (that i have made) to be copied into a different directory on my server and renamed to the name of the child.
    So
    Maybe have a popup box when Add Child is clicked saying Add new name, where the leader can add the childs name, when its submitted it copies the folder where i have the editable form to a different directory on the server and that name is added to a table where i can access each individual form.

    Does that make sense?

    Please help me with this as i havnt got a clue on how to do it.

    Thanks. Andrew

  • #2
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    878
    Thanks
    0
    Thanked 114 Times in 113 Posts
    Makes perfect sense.

    But the copying of the folder must be done through a server-side function.
    Javascript cannot make any changes to files, nor create new files.

    You can use javascript to call the actions, but the action and changes must be done server-side.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    But I would also say that by *NOT* using a database you are complicating things not only for yourself but for those who come after you.

    Sure, you can use one file per child. But now how do you answer questions such as "How many children are ages 9 or 10?" or "How many children live in XYZ city?"

    When you put that data into individual files, that means you have to do this by opening up each individual file, finding that information in the file, and adding (or not adding) to the total. And that's just for very very simple questions.

    If you used a database, you could answer questions like that instantly along with much more complex ones (e.g, create a 2-dimensiaonal chart that shows the count of all kids by age and by town).

    You are really painting yourself into a hole by not using a database.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

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