I collect data from a form like this :
$title = $_POST["title"];
$fname = $_POST["first_name"];
$surname = $_POST["surname"];
I want tot build an XML String and add the above post data. I have tryed the following and none of it works. It has to use "" double quotes !
$XPost = '
<MinPrice>$_POST["first_name"]</MinPrice>
';
$XPost = '
<MinPrice>"<![CDATA[$fname]]"></MinPrice>
';
Can anyone please assist. It has to use "" double quotes !
Full Example :
$strXml = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<SubmitLead xmlns="https://test.com.co.uk/webservicerequest/">
<Address1>'.{$_POST['Address1']}.'</Address1>
';