Is it choking after the first word, or after the space after the first word?
<div class="yn-story-content">
<p>TOKYO – Once Japan's leaky nuclear complex stops spewing radiation and its reactors cool down, making the site safe and removing the ruined equipment is going to be a messy ordeal that could take decades and cost hundreds of millions of dollars.</p>
Or are you getting it from a feed, maybe inside CDATA?
Only a guess, but I’m thinking it probably has something to do with the MySQL charset. I would have thought that MySQL would mess the bytes and show “funny characters” but maybe it chokes and stops the INSERT/UPDATE when a character is outside of the charset range?
That’s not the entire script is it? You didn’t even use mysql_real_escape_string() in that script, and you are populating the textarea with the $cleancontent variable which is not defined in your script. What is $cleancontent supposed to be?
$cleancontent was left there by accident. ( You can ignore it )
I can’t post the entire script. So I simplified it.
The same error occurs with other scripts I am using.
I’m quite sure its has something to do with the mysql charset.
Wordpress is able to save the entire article content using the same mysql charset.
Obviously Wordpress surely processes the content much better.
If you use that code snippet that you posted, and mysql_real_escape_string() and remove the $cleancontent variable does it work for you? I tried it and it works fine.
I see what the error is now.
My external database connection file had extra include files that were modifying the $_POST data. I rewrote a very simple database connection and everything is working just fine now.
So that solves it…
Thank You!
Sample php connection I used, instead of the complicated external database connection.
$dbhost = 'localhost';
$dbuser = 'xxxxxxx';
$dbpass = 'xxxxxxxxxxx';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'wordpress';
mysql_select_db($dbname);
Thanks to aamonkey, guido2004, Ethan-27, r937 and Mittineague and everyone else who took the time to look into this. I really appreciate it!