A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: xml loading trough php

  1. #1
    The Great euh eh you know paul67's Avatar
    Join Date
    Oct 2000
    Location
    the Netherlands
    Posts
    283
    hai

    i seem to have a problem loading xml
    I am trying to use php to collect the data from the datebase and send it as xml to flash
    The php file/code works. I checked.
    But nothing appears on screen
    when using a "menu.xml"-file the xmldata comes shows. but not when using menu.php

    So what's wrong ?

    <pre>
    db_array = new Array();
    xmlmenu = new XML();
    xmlmenu.onLoad = make_db;
    xmlmenu.load("menu.php");
    </pre>


    Paul

  2. #2
    The Great euh eh you know paul67's Avatar
    Join Date
    Oct 2000
    Location
    the Netherlands
    Posts
    283

    Smile eh my mistake

    Oeps sorry,

    I made a mistake in the .php file

    So , for those having similar problems
    XML is very precise:
    I forgot the first return before menusystem
    I works fine now

    <code>
    echo '<?xml version="1.0" encoding="iso-8859-1"?>';
    echo '<!DOCTYPE menusystem SYSTEM "xmlmenu.dtd">';
    echo "\n<menusystem>\n";

    //getting menudata from db:

    for ($i=0;$i<=count($menu);$i++)
    {
    echo "<menu>\n";
    echo " <id>".$menu[$i]["id"]."</id>\n";
    echo " <parent>".$menu[$i]["parent"]."</parent>\n";
    echo " <naam>".$menu[$i]["naam"]."</naam>\n";
    echo " <sjabloon>".$menu[$i]["sjabloon"]."</sjabloon>\n";
    echo "</menu>\n";
    }

    echo " </menusystem>";
    ?>
    </code>
    [Edited by paul67 on 06-15-2001 at 06:49 AM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center