PDA

View Full Version : Large Blocks Not inserting...


JakeM
02-07-2010, 02:28 AM
Hey guys,

I'm having an issue with my coding, I run a blog site relating to an online game for teenagers Habbo Hotel.

My blog site is: here (http://www.tallusonhabbo.net)

I use this code when submitting a new blog entry:

if(isset($_POST['submit'])){
$title = $_POST['title'];
$short_story = $_POST['short_story'];
$long_story = $_POST['long_story'];
date_default_timezone_set('Australia/Sydney');
$date = date("r");

$newblog = mysql_query("INSERT INTO `entries` (`ID`, `Title`, `short_story`, `Date`, `Blog`) VALUES (NULL, '$title', '$short_story', '$date', '$long_story')");
echo '<script language="javascript"> alert ("Blog Added!");</script>';

}


And If the blog I'm writing is:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien. Nam consectetuer. Sed aliquam, nunc eget euismod ullamcorper, lectus nunc ullamcorper orci, fermentum bibendum enim nibh eget ipsum. Donec porttitor ligula eu dolor. Maecenas vitae nulla consequat libero cursus venenatis. Nam magna enim, accumsan eu, blandit sed, blandit a, eros.

Quisque facilisis erat a dui. Nam malesuada ornare dolor.



It will successful complete everything (I do have the show errors thing for php in the script so theres no hidden errors) but the data won't ACTUALLY get inserted into the db

If I insert:

Blah 1









Blah 2

It works...

My tag <textarea rows="50" cols="30" name="long_story"></textarea><br /><br />


Driving me nuts, if you can help please do :D

tomws
02-07-2010, 04:42 AM
You've left out some necessary information. Have you debugged by testing that the posted value is what's expected? Have you debugged by examining the actual query string passed to the db? What is the `Blog` field definition in the table? How do you know everything completes successfully if you're not testing the mysql_query return value?