Darkwoods Posted December 29, 2009 Share Posted December 29, 2009 Hey i got a flash news rotator and it take the data from an xml file... so i have to connect to the database in the xml file and echo the data in the xml file let say i want to SELECT FROM 'news', 'id' 'title'; and echo the title in xml can that be done if yes please could anybody guide me thanks Quote Link to comment https://forums.phpfreaks.com/topic/186562-php-mysql-codes-inside-xml-files/ Share on other sites More sharing options...
Maq Posted December 29, 2009 Share Posted December 29, 2009 Hey i got a flash news rotator and it take the data from an xml file... so i have to connect to the database in the xml file and echo the data in the xml file let say i want to SELECT FROM 'news', 'id' 'title'; and echo the title in xml can that be done if yes please could anybody guide me thanks I'm not sure I follow. You want to get what from where and do what? Quote Link to comment https://forums.phpfreaks.com/topic/186562-php-mysql-codes-inside-xml-files/#findComment-985251 Share on other sites More sharing options...
Darkwoods Posted December 29, 2009 Author Share Posted December 29, 2009 i got flash file swf and it take the data like text and image from a xml file okay? so what im asking how do i get my data from the database in an XML file how do i echo the text and image from the database when using XML file thanks Quote Link to comment https://forums.phpfreaks.com/topic/186562-php-mysql-codes-inside-xml-files/#findComment-985460 Share on other sites More sharing options...
oni-kun Posted December 29, 2009 Share Posted December 29, 2009 i got flash file swf and it take the data like text and image from a xml file okay? so what im asking how do i get my data from the database in an XML file how do i echo the text and image from the database when using XML file thanks You can always do it with this method if you want it to be easy, Create a .htaccess file in root and place this: AddType application/x-httpd-php .xml In one of the lines. This will basically, allow PHP codes within the XML file. Yet it will appear as an XML file from the browser/your swf. You can even make it so you can call it like this. file.xml?id=2 or whatnot for your database access. Quote Link to comment https://forums.phpfreaks.com/topic/186562-php-mysql-codes-inside-xml-files/#findComment-985466 Share on other sites More sharing options...
ignace Posted December 29, 2009 Share Posted December 29, 2009 No need for that. Let your flash call load-xml-data.php?id=2 Which returns a valid XML document. Quote Link to comment https://forums.phpfreaks.com/topic/186562-php-mysql-codes-inside-xml-files/#findComment-985535 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.