Return to Snippet

Revision: 1126
at September 13, 2006 09:34 by smilylion


Initial Code
#Datenverarbeitung
if (isset($HTTP_POST_VARS['delete'])) {
$inhalt = file('_matrix2.php');
$fp = fopen('_matrix2.php','w');
flock($fp,2);
while (list($inhalt_key,$inhalt_val) = each($inhalt)) {
if (!isset($HTTP_POST_VARS['delete'.$inhalt_key])) {
fwrite($fp,$inhalt_val);
}
}
flock($fp,3);
fclose($fp);
}
#ENDE: Datenverarbeitung

#Datenausgabe
$inhalt = file('_matrix2.php');

echo '<form method="post" action="'.$HTTP_SERVER_VARS['PHP_SELF'].'">';
while (list($inhalt_key,$inhalt_val) = each($inhalt)) {
echo $inhalt_val.'<input type="checkbox" name="delete'.$inhalt_key.'"><br>';
}
echo '<input type="submit" name="delete"></form>';
#ENDE: Datenausgabe

Initial URL

                                

Initial Description

                                

Initial Title
delete lines in file checkboxes

Initial Tags

                                

Initial Language
PHP