I need make a update xml from php
my code is
<?php
$xml = simplexml_load_file('xmltest.xml');
$linha = $_GET['linha'];
$a = $xml->no[$linha];
// definiçao do nó a editar ou apagar neste ficheiro sera apagar
$titulo=$a->titulo[$linha]=$_POST['titulo'];
$textopequeno=$a->textopequeno[$linha]=$_POST['textopequeno'];
$textogrande=$a->textogrande[$linha]=$_POST['textogrande'];
echo $xml->asXML('xmltest.xml');
?>
This way will make update the first line , and i need to update my choice, if the $linha=1 i update de node 1 if the $linha=2 i update the node 2....How can make this?
How can make update xml from php using simplexml?
Make update
Moderator: General Moderators