Jump to content

[SOLVED] all data in a form field not saving


s4salman

Recommended Posts

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]

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.