I am able to retrieve the row I want (from a flat file). Now I would like to be able to edit and/ or delete that row only without affecting those before or after. Is there a way?
Here's how I am getting the row info ($ed is the id for that row which is posted to the page by clicking a link with the id for that row in it.)
Here's how I am getting the row info ($ed is the id for that row which is posted to the page by clicking a link with the id for that row in it.)
Code:
$file = fopen("ans.txt","a+");
$count = file("ans.txt");
$num = count($count);
for ($i=0; $i<$num; $i++)
{
$edrow = explode("|", $count[$i]);
if ($edrow[0]==$ed)
{
$edid = $edrow[0];
$edqrow = $edrow[1];
$edarow = $edrow[2];
}
}