00stuff Posted July 30, 2010 Share Posted July 30, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/209350-my-code-wont-display-more-than-3972-characters/ Share on other sites More sharing options...
TOA Posted July 30, 2010 Share Posted July 30, 2010 If you're using GET method on your form, there is a limit...look into that. It can be altered in the .ini file if I'm not mistaken. If I am sorry Quote Link to comment https://forums.phpfreaks.com/topic/209350-my-code-wont-display-more-than-3972-characters/#findComment-1093141 Share on other sites More sharing options...
aleX_hill Posted July 30, 2010 Share Posted July 30, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/209350-my-code-wont-display-more-than-3972-characters/#findComment-1093144 Share on other sites More sharing options...
Wolphie Posted July 30, 2010 Share Posted July 30, 2010 http://classicasp.aspfaq.com/forms/what-is-the-limit-on-querystring/get/url-parameters.html May be useful. Quote Link to comment https://forums.phpfreaks.com/topic/209350-my-code-wont-display-more-than-3972-characters/#findComment-1093146 Share on other sites More sharing options...
00stuff Posted July 30, 2010 Author Share Posted July 30, 2010 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!!! Quote Link to comment https://forums.phpfreaks.com/topic/209350-my-code-wont-display-more-than-3972-characters/#findComment-1093183 Share on other sites More sharing options...
TOA Posted July 30, 2010 Share Posted July 30, 2010 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 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?) Quote Link to comment https://forums.phpfreaks.com/topic/209350-my-code-wont-display-more-than-3972-characters/#findComment-1093189 Share on other sites More sharing options...
00stuff Posted July 30, 2010 Author Share Posted July 30, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/209350-my-code-wont-display-more-than-3972-characters/#findComment-1093192 Share on other sites More sharing options...
aleX_hill Posted July 30, 2010 Share Posted July 30, 2010 To implement a rich text editor you would probably want to use one of the following (google them) CKEditor tinyMCE jQuery Editor dojo.editor (probably not the best option) Quote Link to comment https://forums.phpfreaks.com/topic/209350-my-code-wont-display-more-than-3972-characters/#findComment-1093197 Share on other sites More sharing options...
TOA Posted July 30, 2010 Share Posted July 30, 2010 "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 Try closing the browser. Other than that, let an admin know is the only thing I can think of Quote Link to comment https://forums.phpfreaks.com/topic/209350-my-code-wont-display-more-than-3972-characters/#findComment-1093199 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.