Greetings,
Still learning - still fussing with my flatfiles
I have gone around in a variety of circles testing options.
time for help!!!!!
I want to give the user the option to change data in their (f'file) dbase entry.
$fh = fopen("$datafile","r+");
while(!feof($fh))
{ $line = fgets($fh);
$row = explode("\t",$line);
if ($row[0] == $name) // $name from login form
this gives me the row I am after
row[14] is the value I want to change.
I think to do something like:
$new_line = $row;
unset($row);
fwrite($fh,$new_line);
BUT it do no woik
am I heading in the right direction
where to from here
OR....
is there a simpler routine to modify a specific 'cell' value
I know it is pretty basic stuff but - until I get a good feel of the environment and its variables - "I'll be back..."
Any suggestions much appreciated.
thanks - arfa
|