Hi,
I have a question about variable naming when handling forms and fields between php pages and a database:
I'm having trouble in my PHP code keeping track of the different variables I've got in a php/html page at any one time, i.e.:
- Values being input by a user into a form
- Values being sent to another page by my form ( I may have had to format the variables the user entered in item 1).
- Variables being received that were sent by a form in a previous page.
- Variables being taken from a query result.
- Variables being created appending query result variables.
There may be more but those are enough to keep me busy...
I need to know a good naming convention so I can keep track of which variable has come from where, so I know which I got from a form that I can use to build a query, which were the result of the query, which to display, which to submit to the database and which to send on to the next form....
I may be making more work of this than I need to, but if anyone has
rules they follow that help with this kind if thing then I'll be relieved to hear them.
Many thanks,
Ben