Clientlist.php looks like this
1 2 3 4 5 6 7 |
1 2 3 4 5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<?php $clientdel = $_POST['clientidnum']; //sent from another page // $clientdel = "4"; $clientdel = trim($clientdel); $fname = "clientlist.php"; $lines = file($fname); foreach($lines as $line) { $line_no++; if(!strstr($line, $clientdel)) $out .= $line; } $f = fopen($fname, "w"); fwrite($f, $out); fclose($f); ?> |
Clientlist.php should now look like
1 2 3 4 5 6 |
1 2 3 5 |