So I'm writing an XML file in php with fopen/fwrite/fclose and then attempting to save that information into a MySQL database BLOB field; however, I'm running into an issue where after saving the information into MySQL, all the file contains is "Resource id #33" and none of the information that I was trying to save.
$blahXMLFile = fopen($_POST['scenBlahNewName'].".xml","wb"); fwrite($blahXMLFile, "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>"); fwrite($blahXMLFile, "<Blah>"); fwrite($blahXMLFile, "<Name>"); fwrite($blahXMLFile, $_POST['scenBlahNewName']); fwrite($blahXMLFile, "</Name>"); fwrite($blahXMLFile, "</Blah>"); fclose($blahXMLFile); And then after that I take the $blahXMLFile php variable and try to save it in the BLOB field in my MYSQL database and "Resource id #33" is all that's in the file. This is also the case if I use javascript to alert the php variable.
What am I missing?
No comments:
Post a Comment