Hi all ….. am a beginer in this field. its request anyone to help me….
<?php
// $page =’1.xml’; [SIZE=9]this is working
$page =$_POST[‘pagename’]; //[SIZE=9]but why here not able to load from the given input value (file name)
$doc = new DOMDocument();
$doc->load($page);
$contains = $doc->getElementsByTagName(“contains”);
foreach ($contains as $don) {
foreach($don->childNodes as $child) {
if ($child->nodeType == XML_CDATA_SECTION_NODE) {
echo $child->textContent . “<br/>”;
}
}
}
?>
<form action=” ” method=”post”>
<input name=”pagename” value=” “/>
<input type=”submit” name=”my_form_submit_button”
value=”Click here to desire page”/>
</form>
</body>