The exact error
This page contains the following errors:
error on line 3 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.
My PHP file
<?php
header( 'Content-type: text/xml' );
mysql_connect( "mysql3.000webhost.com", "Username", "Password" );
mysql_select_db( 'Ddb' );
mysql_query( "INSERT INTO items VALUES ( null, null, '".
mysql_real_escape_string( $_REQUEST['user'] ).
"', '".
mysql_real_escape_string( $_REQUEST['message'] ).
"')" );
?>
<success/>
My HTML file (I don’t think this has anything to do with the error though.)
<html>
<head>
<title>Add Definition Form</title>
</head>
<body>
<form action="add.php" method="POST">
User: <input name="user" /><br />
Message: <input name="message" /><br />
<input type="submit" />
</form>
</body>
</html>
chmod 777 on all files (I know thats bad but the site isn’t public yet).
Comment if you need more information.
Tutorial I am following http://www.ibm.com/developerworks/library/x-ioschat/index.html#l3ioschat/index.html#l3
Following exactly to the point as mentioned in the IBM document. I have uploaded a test page on http://nixblog.webatu.com/test.html and it works.
So not sure what you are doing wrong.
According to the example the database table insert is for table ‘chatitems’ and you seem to be using ‘items’. just make sure what you are inserting is correct and that it doesnt show any database errors. to do this change ‘Content-type: text/xml’ to ‘Content-type: text’