This is it without the DB-conection ofcourse:

if (isset($_POST['sendRequest']) && $_POST['sendRequest'] ==
"read_all_projects") {  
  $sql = "SELECT * FROM tbl_projecten";
        $result = mysql_query($sql);
        header("Content-type: text/xml");
        $response ='<?xml version="1.0" encoding="UTF-8" ?>';
        $response .="\n<data>";
  while($row = mysql_fetch_object($result)){
                $response.='<project>';
        
$response.='<project_code><![CDATA['.$row->project_code.']]></project_code>'
;
        
$response.='<project_datum><![CDATA['.$row->project_datum.']]></project_datu
m>';
        
$response.='<project_klant_nummer><![CDATA['.$row->project_klant_nummer.']]>
</project_klant_nummer>';
        
$response.='<project_naam><![CDATA['.$row->project_naam.']]></project_naam>'
;
        
$response.='<project_omschrijving><![CDATA['.$row->project_omschrijving.']]>
</project_omschrijving>';
        
$response.='<project_werkzaamheden><![CDATA['.$row->project_werkzaamheden.']
]></project_werkzaamheden>';
        
$response.='<project_ordernummer_klant><![CDATA['.$row->project_ordernummer_
klant.']]></project_ordernummer_klant>';
        
$response.='<project_contactpersoon><![CDATA['.$row->project_contactpersoon.
']]></project_contactpersoon>';
        
$response.='<project_aanneemsom><![CDATA['.$row->project_aanneemsom.']]></pr
oject_aanneemsom>';
        
$response.='<project_opdracht><![CDATA['.$row->project_opdracht.']]></projec
t_opdracht>';
                $response.='</project>'; 
        }
        $response.="</data>";
        print $response;
}

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

Your php code is broken then.
_______________________________________________
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

Reply via email to