Ok,, im used to going to Codewalkers, but all everyone tells me is that you cant add edit delete cells in a flat file database...
well,, if i can use php to get to that cell, and be able to tell exactly what that cell is, what line, what cell, and what is in the cell... like
Line 1, cell 2 = lineonecelltwo
this is using a text database with
line 1|cell1|cell2
line 2|cell1|cell3
i can list them as categories and sub categories if i want,, naturally..
what im trying to do is add to the database such as
line 1|cell1|cell2|cell3
cell 3 being added...
and edit the cell...
change cell1 to cell11
or delete the cell altogether...
line|cell1|cell3
i have this code so far...
include 'filedb.php';
if($subcat != $Data[$K][$i]){
$Lines = file("$path/cat.dat");
foreach($Lines as $Key => $Val){
$Data[$Key] = explode("|", $Val);
}
for($K = 0; $K < sizeof($Lines); $K++){
for($i = 0; $i < sizeof($Data[$K]); $i++){
echo 'Line '.$K.' cell '.$i;
if($line == $K && $id == $i){
$file = "../inc/data/cat.dat";
//$fp = fopen("$file", $K, "a");
list ($K) = split ('\|', $line);
echo ' = '.$line,' = '.$Data[$line][$id].'
';
//fwrite($fp,"|$subcat");
//fclose($fp);
}else{
echo '
';
}}}}
anyone have any ideas?
|