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
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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.