Jump to content

php and xml


DrTrans

Recommended Posts

I super duper need some help.

 

  I need to be able to store the Transaction Number in my MySql Database. Can Someone please help

 

$data = "
				<Response>
	            	<TransactionNumber>2411314</TransactionNumber>
	                <ReportDate>2012-08-13</ReportDate>
                    <ApplicationDecision>Conditional</ApplicationDecision>
                    <Report><![CDATA[				

		<html>
	    <head>
	    
	    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	    <title>Applicant Screening Results</title>
	    </head></html></Report>
	    ";

   $xml = new simplexml_load_string($data);
   $xml->asXML();
   $xml->Responce->asXML();
   $xmlnum = $xml->TransactionNumber->asXML();
   echo "<br>$xmlnum<br>";
   
   $data2 = $xml->Response->asXML();   

    $connect = mysql_connect("localhost","****","*****");
    mysql_select_db("magic");
    $back = "2";
$queryreg = $mysql_query("UPDATE application SET background_num = '$xmlnum' WHERE appID = '$appID'")or die(mysql_error());

 

Link to comment
https://forums.phpfreaks.com/topic/267040-php-and-xml/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.