DrTrans Posted August 13, 2012 Share Posted August 13, 2012 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 More sharing options...
Barand Posted August 13, 2012 Share Posted August 13, 2012 Apart from invalid XML what is the problem exactly? Link to comment https://forums.phpfreaks.com/topic/267040-php-and-xml/#findComment-1369140 Share on other sites More sharing options...
DrTrans Posted August 13, 2012 Author Share Posted August 13, 2012 Theres more xml.. its actually valid. I just need to get the transaction number. and put it into a string Link to comment https://forums.phpfreaks.com/topic/267040-php-and-xml/#findComment-1369141 Share on other sites More sharing options...
Barand Posted August 13, 2012 Share Posted August 13, 2012 So you thought you'd just post part of to make it difficult for anyone to test a solution to your problem? Link to comment https://forums.phpfreaks.com/topic/267040-php-and-xml/#findComment-1369153 Share on other sites More sharing options...
DrTrans Posted August 14, 2012 Author Share Posted August 14, 2012 No. Theres other data that i dont want public on the internet from the xml string. Let me format and ill repost the $data code Link to comment https://forums.phpfreaks.com/topic/267040-php-and-xml/#findComment-1369184 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.