Creation of the world
This commit is contained in:
25
ajax/addSiteXML.php
Normal file
25
ajax/addSiteXML.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?
|
||||
$number = $_POST['number'];
|
||||
$url = $_POST['url'];
|
||||
$name = $_POST['name'];
|
||||
|
||||
$nb = 1;
|
||||
|
||||
$xmla = simplexml_load_file('../db/blog_links.xml');
|
||||
|
||||
$test = $xmla->note;
|
||||
|
||||
$field_count = count($test);
|
||||
|
||||
for($i=0;$i<$field_count;$i++){
|
||||
if($nb <= $test[$i]['id']) $nb = $test[$i]['id']+1;
|
||||
}
|
||||
|
||||
$newnote = $xmla->addChild('link');
|
||||
$newnote->addChild('name', $name);
|
||||
$newnote->addChild('number', $number);
|
||||
$newnote->addChild('url', $url);
|
||||
$xmla->asXML('../db/blog_links.xml');
|
||||
|
||||
echo $nb;
|
||||
?>
|
Reference in New Issue
Block a user