Posted 25 July 2015 - 03:46 AM
So what I am trying to do is create a database program that will generate and edit customer files. I have a simple menu to select which program to run, which consists of two options, QUERY and EDIT, and launches the corresponding programs. This first part is all fairly basic and not where I'm having troubles. The problem I am running into is that I have never actually done a form in Lua, I have done some in HTML but I'm out of my depth here.
So, what I want is a program to handle viewing of a file, which will be generated for each customer. For example, I select EDIT and enter the name of the customer, an if/else goes and if the file for that customer does not exist it makes one, and opens it to be edited.
There will at this point be X fields that I would like to track:
When editing I would like to only be able to edit membership, orders, and payments.
As for QUERY, I would like it to just display the fields and their values/strings after asking for the customer's name, or return an error if the file does not pass an fs.exists() check.
Just to reiterate, each customer would have their own .txt/program on the computer… unless of course someone could put this all in one, but I would like them separate to save my brain. If someone could A) walk me through the methods of trying to do this, or B)/> supply heavily annotated code; that would be great.
Any further questions as to what I want to be able to do are welcome, but I think i covered most of it in my ramble.
Thanks in advance!
So, what I want is a program to handle viewing of a file, which will be generated for each customer. For example, I select EDIT and enter the name of the customer, an if/else goes and if the file for that customer does not exist it makes one, and opens it to be edited.
There will at this point be X fields that I would like to track:
Name: (Name of file/customer)
Membership: (Regular, VIP, VIP+)
Outstanding Orders: (A string for example: "63 cooked porkchops")
Outstanding Payments: (Another string, Ex: "3 iron ingots")
When editing I would like to only be able to edit membership, orders, and payments.
As for QUERY, I would like it to just display the fields and their values/strings after asking for the customer's name, or return an error if the file does not pass an fs.exists() check.
Just to reiterate, each customer would have their own .txt/program on the computer… unless of course someone could put this all in one, but I would like them separate to save my brain. If someone could A) walk me through the methods of trying to do this, or B)/> supply heavily annotated code; that would be great.
Any further questions as to what I want to be able to do are welcome, but I think i covered most of it in my ramble.
Thanks in advance!