PHP Help
PHP Help
- Started
- Last post
- 4 Responses
- skonge
I am writing form data to a text file. How would I write the text file back into form fields so I can edit it?
Help is much appreciated. Thanks.
- van_rijn0
include it then parse it with the form text ields into the value
- tomkat0
yeah you could store it comma-separated and then split it into the single elements. in teh html you'd have
input type="text" value="myArr[1]"
- skonge0
I can't store it comma speparated. This is the format it is being stored. Ideally I would populate every other value into a form field to be editable.
- acescence0
i would use file() to read the file, then do a foreach loop to read each line, use strpos to look for the space between the param and it's value, and assign everything after the space to each form field