2016-11-17 22:16:26 +01:00
|
|
|
<?php // Escaping the input data:
|
2010-09-14 23:38:29 +02:00
|
|
|
|
|
|
|
$rid = $_POST['id'];
|
|
|
|
$explodeid = explode("-",$rid);
|
|
|
|
$id = intval($explodeid[1]);
|
|
|
|
|
|
|
|
|
|
|
|
$xmla = simplexml_load_file('../db/notes.xml');
|
|
|
|
|
|
|
|
$target = false;
|
|
|
|
$i = 0;
|
|
|
|
|
|
|
|
foreach ($xmla->note as $s) {
|
|
|
|
if ($s['id']==$id) { $target = $i; break; }
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
if ($target !== false) {
|
|
|
|
unset($xmla->note[$target]);
|
|
|
|
}
|
|
|
|
|
|
|
|
$xmla->asXML('../db/notes.xml');
|
|
|
|
|
|
|
|
$target++;
|
|
|
|
echo $target;
|