I m doing a notesboard, i use flash to loadvariables the below php file to save data to the text files.
My php file is like this:
// store the variables passed by POST
$fp = fopen("notes1.txt", "w");
if (!$fp) die ("cannot open the file");
fputs($fp, "&a1=".$a1, 4096);
fputs($fp, "&d1=".$d1, 4096);
This code is not wrote by me. I m an outsider of PHP so I wish someone can help me to modify the above
codes to what i want.
Using the above php codes, I meet great inconvenience when I want to update only a single variable
in the text.
for example, like the above code stated, I have two vars "a1" and "d1",and both have some values.
Now the main problem is, even if i only want to update the value of "a1", i can't load an url like this:
(bcoz if i load variables like the above url, the value of d1 will automatically be empty)
so I have to loadvariables like this
So, the above php code will cause me into great trouble when I got about 50 variables in a single text
files and when, even if I just want to update a single variable but I m forced to gather all 50 variables'
data and loadvariables like this :
the result will be error because the total length of this url is too long for a browser.
In short, I hope somebody can change the above code for me so that, if i want to change the value of
"a1" only, then I can loadvariable like this :
but the php code will NOT replace "d1" value by an empty value!!!!!
Hope that u can understand wat i mean!