So heres my problem! I am using simplexml in my website as a substitute for MySQL because I'm using a mobile, its working fine with the addChild request but when it submits it either overrides the original xml file or well il explain it with code xml file:
<?xml version="1.0"?>
<video><title>title 22</title></video>
Php file:
<?php
$file = 'database.xml';
$title = $_POST['1'];
$xml = simplexml_load_file($file);
$xmlne = $xml->videos;
$d = "<video></video>";
$newvid = new SimpleXMLElement($d);
$newvid->addChild('title' , $title);
$newvid->asXML($file);
?>
<form action="index.php" method="post">
<input type="text" value="title" name="1">
<input type="submit" value="post"/>
</form>