Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1017563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:43:27+00:00 2026-05-16T10:43:27+00:00

I understand that JavaScript isn’t really made to open and save files. The best

  • 0

I understand that JavaScript isn’t really made to open and save files. The best method I’ve seen to get this to work is to use a form and then POST all the information I need to a PHP file that can than save the information I want to a file.

I plan on producing this kind of data and storing it to a csv:

Name,Low,High,Number

Using inputboxes and javascript. I have decided that I will start off like this (____________ is an inputbox)

Name: ______________    Start: 0      End: _____  Wage ______  [add button]

When the person clicks add, it will then store the data to a variable. How should I do this the best? Assuming the person fills in this information:

Name: Brian             Start: 0      End: 100    Wage 200  [add button]

Should I do something like $Array[‘Brian’][0,100,200]?

And then I can somehow loop through the array in PHP when its sent via POST?


Keep in mind when the person clicks Add, another option appears using previous data such as my example of Brian,0,100,200

Name: Brian           Start: 100       End: ______   Wage: ______   [add button]

The idea being that no gaps between low and high can be created. You can’t end at 100 and start at 200, the next is always the start.

Edit:

Just to give some background, what I am storing is actually hourly wage for people. Brian,0,20,20 actually sets that for hours between 0 and 20; brian will make $20 an hour.

What are “Start”, “End” and “Wage” signifying?

Start of the hour range, End of the hour range, and the hourly wage.

Do you need to store their data permanently?

It will need to be stored to a CSV file, which gets intercepted by the client and covertes it into a SQLite memory database for processing

Will there be more than one entry for “Brian” within a storage period?
Yes, as many entries as you wish. There also HAS to have a name which ‘Default’ is set… This will be the case where if the employee doesn’t have special wages, they get the default employee wages and overtime something like:
Default,0,40,15
Default,40,1000,20

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:43:27+00:00Added an answer on May 16, 2026 at 10:43 am

    I would have the input boxes set up like so:

    Name:  <input type="text" name="name[]">
    Start: <input type="text" name="start[]">
    End:   <input type="text" name="end[]">
    Wage:  <input type="text" name="wage[]">
    

    That way you can easily handle multiple entries.


    See Working Demo and Source Code

    Code is very ugly but I am sure you can more polish into it. You can do all your verification on the server side, removing empty entries and such.
    Most of the explanation and some sample code on the links. (Needs jQuery.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.