Here it is, I have commented it so you can understand it better, you may want to make certain fields hidden, but for the moment it allows you to see how the data is passed, follow this:
<-- create a file with this data name it call.php -- >
<?
$filea = "file.php"; // the file you want to read edit
$fileb = "process.php"; // the file that will process your amends
echo "<font face='arial' size='3'><b>CONTENTS OF : <a href='$filea'>$filea</a></b></font><br><br>";
$contents = file("$filea");
$length = sizeof($contents);
for($i = 0; $i<$length; $i++)
{
echo "<table width=\"100%\" bgcolor=\"#000033\" cellpadding=\"2\" cellspacing=\"2\" border=\"0\"><tr><td align=\"center\">$contents[$i]<form method=\"post\" action=\"$fileb\"><input type=\"text\" name=\"getline\" value=\"$i\"><input type=\"text\" name=\"filea\" value=\"$filea\"><input type=\"submit\" name=\"remove\" value=\"remove line\"></form></td></tr><tr><td align=\"right\"></td></tr></table><br>";
}
?>
<-- end of call.php -->
<-- create a file with this data name it process.php -->
<?
// this function removes the unwanted data
$del_data = ""; // Replaces the line with blank data
$current_line = 0;
$write_line = $getline;
$contents = "";
$fp = fopen ("$filea", "r"); // declare your file
while ($data = fgets($fp, 4096)) // reads single lines of data
{
if ($current_line == $write_line) // runs a count until the number of the line is reached
{
$contents .= $del_data;
} else {
$contents .= $data;
}
$current_line++;
}
fclose($fp);
// write new contents
$fp = fopen("$filea", "w"); // declare your file
fputs($fp, $contents);
fclose($fp);
// end of amend
header ("location: confirm.php"); // referal address for a confirm page for example
?>
<-- end of process.php -->
<-- create a file with this data name it file.php -->
<font face="arial" size="3" color="FF0000">I am the data on line 1</font><br>
<font face="arial" size="3" color="FF0000">I am the data on line 2</font><br>
<font face="arial" size="3" color="FF0000">I am the data on line 3</font><br>
<font face="arial" size="3" color="FF0000">I am the data on line 4</font><br>
<font face="arial" size="3" color="FF0000">I am the data on line 5</font><br>
<font face="arial" size="3" color="FF0000">I am the data on line 6</font><br>
<-- end of file.php -->
<-- create a file with this data name it confirm.php -->
<?
echo "file has been modified <form action='call.php'><input type='submit' value='back'></form>";
?>
<-- end of confirm.php -->