PDA

JOIN THE FORUM LOUNGE!

By Joining The Forum Lounge you will be able to see the pictures in this thread and post a reply. Also, after 25 posts you'll be able to see the hidden forums as well!

It's free and all of your information is confidential.

Click here to begin interacting!
Click here to register

Join in on this Discussion and see the pictures. Click here-> : php variables in XML?


Manntis
12-03-2007, 11:57 PM
I have a website with the layout set in a .php page using variables, so I can change the site color simply by changing certain variables.

I'm installing a new flash gallery that draws the image names from an XML page.

How can I send php populated variable information into the XML? For example, if the XML page reads

frameColor="0x000000"

but the .php variable that assigns the site theme color is $fcolor, and is a global variable. I want to do something like


frameColor="0x<? echo $fcolor; ?>"

but of course I can't, since the XML page doesn't recognise .php

Manntis
12-04-2007, 01:51 AM
well I figured the easiest way was to make the XML page a php page, echoing the XML content and filling in the variables.

But there's still a problem: the javascript that calls the pseudoXML page uses:

fo.addVariable("xmlDataPath", "pseudoXML.php?somevar=5");

But when it gets the page and uses it for the flash, it doesn't pass through the value of $somevar, even with $somevar = $_GET[somevar] on the pseudoXML page. So how do I pass the variable value through?

Manntis
12-04-2007, 06:01 PM
nevermind. I just had to use the _GET in 2 places instead of 1.

Vert8813B
12-06-2007, 08:06 AM
Stop talking to yourself.

Manntis
12-06-2007, 09:44 PM
Usually some other computer-savvy person like Chris presents an answer; but when asking for code solutions, it's good manners to announce if the problem has already been solved. Go back to bitching at Queen in other threads.

Vert8813B
12-07-2007, 08:06 PM
:lmfao: Touche.

JOIN THE FORUM LOUNGE!

By Joining The Forum Lounge you will be able to see the pictures in this thread and post a reply. Also, after 25 posts you'll be able to see the hidden forums as well!

It's free and all of your information is confidential.

Click here to begin interacting!
Click here to register