s4salman Posted November 25, 2007 Share Posted November 25, 2007 Hello i am using a form and a php script to save form data into mysql database.it is ajokes script that i made myself.when i enter jokes(which is long enough), only two or three line is saving in mysql field. i am attaching the script.please see where there is an error. You can see this : http://www.fun007.com/jokes-details.php?id=37 (not adding full joke into mysql database) the full joke that i entering into form field "details" is : Little Johnny drew a fly on the class grade book. It looked so realistic, that when Miss Baker saw the fly sitting on the notebook, she slammed it with a ruler. The fly didn't fly away. So she slammed the book once again, again the fly didn't fly away. This drove Miss Baker really mad, so she started to pound the book with the ruler and, as a result, the grade book became a bunch of torn sheets of paper. With the class laughing, she realized what had happened. Then Miss Baker called Little Johnny's father to school. "You see what your son did to our class grade book?" she said. "That's nothing." replied the father. "Last month, he drew a naked woman on a fence and for two weeks straight I was pulling splinters out of my dick." Plz help [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Psycho Posted November 25, 2007 Share Posted November 25, 2007 What is the field length for that field in your database? I find it interestng that there appear to be exactly 200 characters that are saved (not counting the ?>). Have you verified if all the text IS in the database or not? For debugging purposes I suggest changing all your INSERT queries as follows: Change this mysql_query("INSERT INTO jokes VALUES ('NULL', '$nameA', '$categoryA', '$detailsA', '$dA', '1')"); To this: $query = "INSERT INTO jokes VALUES ('NULL', '$nameA', '$categoryA', '$detailsA', '$dA', '1')"; echo $query . "<br>"; mysql_query($query); After you verify that you are indeed sending the complete text with the INSERT then you will know whether it is a PHP Quote Link to comment Share on other sites More sharing options...
BenInBlack Posted November 25, 2007 Share Posted November 25, 2007 well according to you schema you have limited it the field "details" to 200 varchar, the length of the joke is 737 chars, you need to increase this to like 2000 varchar. Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted November 25, 2007 Share Posted November 25, 2007 Edit : Ben is right Quote Link to comment Share on other sites More sharing options...
s4salman Posted November 25, 2007 Author Share Posted November 25, 2007 yes you people r right.the length of 200 was the problem. now i increase this , now every thing is fine. Thanks for help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.