Good to hear.
Best,
Karl
On Jul 21, 2011, at 2:34 AM, Cor wrote:
OK, so when I change the output line in my PHP from:
print $response;
to
print "returnString=$response";
It traces out a correct XML:
<?xml version="1.0" encoding="UTF-8" ?>
<data><project><project_code><![CDATA[1]]></
project_code><project_datum><![C
DATA[2011-07-19]]></project_datum><project_klant_nummer><![CDATA[1]]
></proje
ct_klant_nummer><project_naam><![CDATA[project naam
1]]></project_naam><project_omschrijving><![CDATA[project omschrijving
1]]></project_omschrijving><project_werkzaamheden><![CDATA[project
werkzh]]></project_werkzaamheden><project_ordernummer_klant><![CDATA
[project
ordernummer klant
1]]></project_ordernummer_klant><project_contactpersoon><![CDATA
[project
Tinus
Plosteling]]></project_contactpersoon><project_aanneemsom><![CDATA
[3000.00]]
</project_aanneemsom><project_opdracht><![CDATA[lopend]]></
project_opdracht
</project></data>
So flash expects a key-value pair!!!
Thanks to all you responded to help me!!!!
Best regards,
Cor van 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 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 URLVariables in Flash rather
than my
database or PHP.
I have looked at the tutorials on
http://www.developphp.com/view.php?
tid=740&t=Discover_Dynamic_XML_MySQL_PHP_
Database_Results_Loop_Tutorial
and there is the same construction but his works appearantly...
Best regards,
Cor
-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-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 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 into the database which will produce the exact
results
your getting.
If you apply one of the following functions to the information once
pulled
out, it should work.
You could try..
$String = htmlspecialchars_decode($string, ENT_QUOTES);
or
$String = html_entity_decode($string, ENT_QUOTES, 'UTF-8');
(There are also different options for the second and third parameters.
ENT_QUOTES and 'UTF-8' can be changed to your suiting depending on
what
style of quoting or character set you need. But for what your
needing, I
think ENT_QUOTES is right.
It will return "<p>" instead of "e;<p>"e; (that is what
ENT_NOQUOTES does).)
I suggest these links if you want to learn more about what's going
on with
these to see if they are a fit.
http://www.php.net/manual/en/function.htmlspecialchars-decode.php
http://www.php.net/manual/en/function.html-entity-decode.php
Also, if you find it still not working, use one of the above
functions, but
then try putting the return $String text inside a CDATA [].
HTH,
Best,
Karl
On Jul 21, 2011, at 12:41 AM, Cor wrote:
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
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders