Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hope I'm in the right section. Please help, I'm only trying to load an xml into a variable and print it to the screen for now.
I'm having a problem with this code:Code: Select all
$dom = new DomDocument();
$dom->load("myXMLtest.xml");Warning: domdocument() expects at least 1 parameter, 0 given in /home/wildiris/public_html/phpTest/saveToXML.php on line 7
Fatal error: Call to undefined function: load() in /home/wildiris/public_html/phpTest/saveToXML.php on line 8
Here is the whole code:
Code: Select all
echo "<p> Welcome <br/><b>".$_POST["user"]."</b>.";
echo "<p> Email is:<br/><b>".$_POST["email"]."</b>.";
echo "<p> Message is:<br/><b>".$_POST["message"]."</b>.";
$dom = new DomDocument();
$dom->load("myXMLtest.xml");
foreach($dom->documentElement->childNodes as $test){
echo $test;
}Thanks in advance, I'm stumped.
mavedog21
onion2k | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]