Jump to content

PHP & mysql codes inside XML files?


Darkwoods

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/186562-php-mysql-codes-inside-xml-files/
Share on other sites

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?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.