I'm having a problem, I am trying to update an XML file via a php/form. I was
able to get my code to work using zend studio, but when I test the same code
using http://localhost, it doesn't work. I have added comments in the code to
see if it breaks, however it doesn't break. It just doesn't save the code to
the DOM. I'm thinking it might have something to do with my configuration
files. If you have any suggestions on how to troubleshoot this please let me know.
Here's the code:
/[FONT=Courier New]/writing to dom
$NewNode = $dom->createElement($Element);
//Adding Due Date Attribute
$NewNode->setAttribute("DateDue",$DueDate);
$NewNode->setAttribute("DateAssigned",Date("m-d-y"));
$Value = $dom->createTextNode($Assignment);
$NewNode->appendChild($Value);
// TODO - need to add if condition
$Node->appendChild($NewNode);
//saving xml file
$dom->save("Teachers.xml");[/FONT]
Thank you very much for your time,
Jeremy