", $datain);
$outCount = count($out) - 1;
$j = $outCount-1;
if ($order == "desc")
{
for ($i=0; $i<=$outCount; $i++)
{
$lines[$j] = unserialize($out[$i]);
$j = $j - 1;
}
}
else
{
for ($i=0; $i<=$outCount; $i++)
{
$lines[$i] = unserialize($out[$i]);
}
}
// Lets Clear the output text file first
@ $fp = fopen("../data/list.txt","w");
flock($fp, 2);
fwrite($fp, "");
flock($fp, 3);
fclose($fp);
// Now that we have all the entries in an array, lets take out the one entry that the user wants deleted
for ($i=0; $i<$outCount; $i++)
{
if ($i != $id)
{
@ $fp = fopen("../data/list.txt","a");
flock($fp, 2);
$data = serialize($lines[$i])."";
fwrite($fp, $data);
flock($fp, 3);
fclose($fp);
}
}
//$URL="delete.php";
//header ("Location: $URL");
?>