bechkam7 Posted October 4, 2007 Share Posted October 4, 2007 "http://www.w3schools.com/php/php_ajax_responsexml.asp"this code is not running..giving error at xmlDoc.getElementsByTagName("firstname")[0].childNodes[0].nodeValue;xmlDoc.getElementsByTagName("firstname")[0] has no propertiesand<?xml version="1.0" encoding="ISO-8859-1"?><person><br /><b>Warning</b>: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <b>C:\xampp\htdocs\new\getuser.php</b> on line <b>23</b><br /></person>in .php file Link to comment Share on other sites More sharing options...
boen_robot Posted October 4, 2007 Share Posted October 4, 2007 You're speaking very criptically.Is <?xml version="1.0" encoding="ISO-8859-1"?><person><br /> your (generated?) XML file? If so, then you need to remove the <br /> as this makes the XML file not well formed and thus, unparsable by any XML parser.What exactly is your PHP code, and if it's the same as the example, do you also already have a MySQL DB and table following the described model? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 4, 2007 Share Posted October 4, 2007 The XML file looks like the response that is supposed to be coming back from the server, but PHP is throwing out an error message in the middle of it. The break tag is sent by PHP when HTML errors are enabled. It looks like the database query is failing that the statement on line 23 of getuser.php is trying to use. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.