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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.