Why not just encapsulate the content in a cdata?
Cheers,
LF
On 20/07/2011 15:35, Glen Pike wrote:
http://php.net/manual/en/function.urldecode.php
On 20/07/2011 15:24, Cor wrote:
I am loading data from a mySQL database into Flash with PHP.
But I get a string with all the tag-signs replaced
Hi Cor,
I think it is because information added to a database is usually
escaped,
so when you pull it out, you get the escaped string instead of what
you originally typed.
Most, not all php coders, will put the string through something like
mysql_real_escape_string()
before inserting it
-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: donderdag 21 juli 2011 8:49
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash
Hi Cor,
I think it is because information added to a database is usually escaped, so
when you pull it out, you get the escaped
Dooren
www.codobyte.com
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: donderdag 21 juli 2011 9:04
To: 'Flash Coders List'
Subject: RE: [Flashcoders] Incorrect XML from PHP to Flash
Hi Karl,
Thank
Coders List'
Subject: RE: [Flashcoders] Incorrect XML from PHP to Flash
Hi Karl,
Thank you!
I already use mysql_real_escape_string() to write to my database.
And in fact I am reading the http://www.php.net/manual/... at the
moment you
send your mail.
I do think it has to do with using
...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: donderdag 21 juli 2011 9:35
To: 'Flash Coders List'
Subject: RE: [Flashcoders] Incorrect XML from PHP to Flash {RESOLVED}
OK, so when I change the output line in my PHP from:
print $response;
to
print returnString=$response;
It traces out a correct XML
Cor skriver:
OK, so when I change the output line in my PHP from:
print $response;
to
print returnString=$response;
So flash expects a key-value pair!!!
Now the real question is, why is Flash expecting that format to begin
with? You shouldn't change your php code. You should change the
?
regards,
Cor van Dooren
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik
Andersson
Sent: donderdag 21 juli 2011 15:10
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash
Cor skriver:
Thank you.
I have:
var myXML:XML = XML(e.target.data.returnString);
You should have XML(loader.data).
Use the URLLoaderDataFormat.TEXT mode, not the
URLLoaderDataFormat.VARIABLES mode.
As for the ordering, did you request any specific order at any time in
the chain? You did
http://php.net/manual/en/function.urldecode.php
On 20/07/2011 15:24, Cor wrote:
I am loading data from a mySQL database into Flash with PHP.
But I get a string with all the tag-signs replaced with %-characters:
%3C%3Fxml%20version=%221%2E0%22%20encoding%3D%22UTF%2D8%22%20%3F%3E%0A%3Cdat
Your php code is broken then.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
;
}
Best regards,
Cor
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik
Andersson
Sent: woensdag 20 juli 2011 16:37
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash
Have you tried without wrapping it in a CDATA tag? Could this be converting
the tags to ASCII?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Did you even look at the code he posted? The code already does that!
As for the code itself, while I do not aprove of using string
concatenation to build xml, that seems to be ok.
You seem to have some sort of dodgey filter running somewhere later in
the chain. I recommend using a http
regards,
Cor
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik
Andersson
Sent: woensdag 20 juli 2011 16:37
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash
Your php code
Sorry, I meant to say NOT wrapping. Problem is beyond that though.
On Wed, Jul 20, 2011 at 10:58 AM, Henrik Andersson he...@henke37.cjb.netwrote:
Did you even look at the code he posted? The code already does that!
___
Flashcoders mailing list
Hi Cor,
I think you will want to put htmlspecialchars() around what comes out
of the database.
$String = htmlspecialchars($database_result);
HTH,
Best,
Karl
On Jul 20, 2011, at 9:24 AM, Cor wrote:
I am loading data from a mySQL database into Flash with PHP.
But I get a string with all
Karl DeSaulniers skriver:
Hi Cor,
I think you will want to put htmlspecialchars() around what comes out of
the database.
More like using a proper XML generating library. I recommend the DOM php
extension.
___
Flashcoders mailing list
...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: woensdag 20 juli 2011 16:58
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash
Hmm, maybe not URL encoding.
What happens when you call the php page directly - in Firefox, does it show
you the XML, or do you have
Is the issue due to sending URLVariables to PHP and Flash expects a
value-pair back???
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
20 matches
Mail list logo