Jump to content

thokchom

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by thokchom

  1. Hi all ..... am a beginer in this field. its request anyone to help me....
    I have 5000 pages as name 1.xml, 2.xml, 3.xml, ............. 5000.xml, so m trying to load the file name which sumited as value in input box.

    <?php
    // $page ='1.xml'; this is working
    $page =$_POST['pagename']; //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>

×
×
  • Create New...