Jump to content

My code won't display more than 3972 characters?


00stuff

Recommended Posts

Hi guys, I am still working on the same code, but encountered another problem. I have a form that takes imput to a MySQL database. It is 5 fields (id,title,category,content,tags). Then I have form a new page that searches with FullText on the (title and tags) fields and echos a link with the content of the result like this:

 

$link = "<h2><a class='example7' href='tutorial.php?id=" . $rowS['id'] . "&title=" . htmlentities($rowS['title'], ENT_QUOTES) . "&category=" . htmlentities($rowS['category'], ENT_QUOTES) . "&content=" . htmlentities($rowS['content'], ENT_QUOTES) . "&tags=" . htmlentities($rowS['tags'], ENT_QUOTES) . "'>" . htmlentities($rowS['title'], ENT_QUOTES) . "</a></h2><br><br>";

 

Then when the user clicks this link, it takes them to the tutorial.php page that all it does is echo the content passed by this link and make it look nice.

 

The problem is that when the data of the content field is greater than 3972 characters in length it doesn't generate the code in the tutorial.php page. It's like if the url is too long to be passed or something... Is that my problem that I'm passing the content in a url? If that is the problem then how can I correct it? How else can I pass the result from the link to the tutorial.php page?

Link to comment
Share on other sites

Try passing the id to the tutorial page through the URL, and then use the tutorial.php page to search the database and display the content. The other thing that may be causing the problem is what your field in the database is set as. I normally use TEXT of BLOB for page content in my databases. For example VARCHAR will only display 256 characters, give or take if I am not mistaken.

Link to comment
Share on other sites

I tried passing just the id with the url and then calling everything else on the tutorial.php page from the database and it worked. I guess the problem was that the url was too long. Thanks guys. You "all" are always great help!!!

Link to comment
Share on other sites

I tried passing just the id with the url and then calling everything else on the tutorial.php page from the database and it worked. I guess the problem was that the url was too long. Thanks guys. You "all" are always great help!!!

 

Our pleasure  :D

 

If it solved your issue, please mark "solved". Otherwise, let us know if there's anything else (like have you figured out how you're going to get the other info you needed?)

Link to comment
Share on other sites

The only other thing I needed to know is how to add a cool text editor like this one so people can make the content bold, put lists, and change color. If you have any suggestions I would really appreciate the help.

 

"About marking the post as solved..."  I have tried but I get this message every time.  "Session verification failed. Please try logging out and back in again, and then try again." I've tried logging out and in again but I always get the same message.

Link to comment
Share on other sites

 

"About marking the post as solved..."  I have tried but I get this message every time.  "Session verification failed. Please try logging out and back in again, and then try again." I've tried logging out and in again but I always get the same message.

 

See my personal message :D  Try closing the browser. Other than that, let an admin know is the only thing I can think of

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.