<?php
//$xml = new DOMDocument();
//$xml->load('test.xml');
if(isset($_POST['title'])) {
$xml = simplexml_load_file("test.xml");
$xml_album = $xml->addChild("album");
$xml_album->addChild("albumart", $_POST["albumart"]);
$xml_album->addChild("title", $_POST["title"]);
$xml_album->addChild("artist", $_POST["artist"]);
$xml_album->addChild("price", $_POST["price"]);
$xml_album->addChild("url", $_POST["url"]);
$xml->saveXML("test.xml");
echo ("Succes");}
?>

<html>
<body>

<form  method="post" action="">
Albumart: <input type="text" name="albumart"><br>
Title: <input type="text" name="title"><br>
Artist: <input type="text" name="artist"><br>
Price: <input type="text" name="price"><br>
Url: <input type="text" name="url"><br>
<input type="submit">
</form>
    
</body>
</html>