I am new to php but have some scenarios in which I want to use it. Since I am new I know I need to do a lot of studying but for now, before I delve into it too much just to find out something isn't possible, I would like to know if something like this is possible. You don't need to spend a lot of time giving me all the code but if I could get some ideas or where and how to search for what I need would be great.
I found a good thread that explained half my question but I want to add to it. I want to be able to search for a specific record (only one at a time) and if it is available, then edit it but if it is not available then I want to insert it. For example, I work with Work Order numbers. If a certain WO is already in the database I want to edit it, but if the WO isn't found, I want to insert a new record using the number I used to search. I'm thinking I would somehow input my WO number into a variable and then first check to see if it is in the database. If it does exist I would populate my form with that record and edit what I need. If it didn't exist I would go to a different part of code somehow and use that variable to populate the form for a NEW record and finish entering what I need and then insert the new record. Or is there a shortcut to all this that it would automatically know to insert if it doesn't already exist? I do not want to be able to insert the same WO number more than once.
I've worked with local databases before and I think this would be possible but would like some input. Like I said, you don't need to supply me with the whole code, but maybe if I could get some php commands that would be necessary so I can study up on them.
Thank you