Saving data to a file - Please Help
Posted: Mon Nov 22, 2010 6:20 am
Hi, Jason here,
I need to get the string data from $sid and $nam to save into a file. The coding echo's the values at the moment and also I have attempted to save the data into a file. For some reason the echo $sid','$nam','; data does what I want from the coding but when I try to save the values that have been echoed it only seems to save one entry from each string and not them all.
It currently echoes the data like this;
sid, nam, sid, nam, sid, nam, sid, nam,
This is what I need to be saved into a file so the rest of my system can then call the saved file and explode the data for future use within a select form.
Here is my coding so far, and you can see at the bottom my attempts to save this data:
Any help would be greatful, as the whole system grabs data that it needs but this section I have to use this code to display the sid and nam values, copy and paste into a .php file and the upload that .php file to my selected directory on the hosting space. If I can get this coding to extract the sid and nam then save it to a file on the host that would cancel out the need for me always having to upload manually etc which can be cery time consuming.
Cheers for any help,
Jason.
I need to get the string data from $sid and $nam to save into a file. The coding echo's the values at the moment and also I have attempted to save the data into a file. For some reason the echo $sid','$nam','; data does what I want from the coding but when I try to save the values that have been echoed it only seems to save one entry from each string and not them all.
It currently echoes the data like this;
sid, nam, sid, nam, sid, nam, sid, nam,
This is what I need to be saved into a file so the rest of my system can then call the saved file and explode the data for future use within a select form.
Here is my coding so far, and you can see at the bottom my attempts to save this data:
Code: Select all
Cheers for any help,
Jason.