Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8694363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:46:13+00:00 2026-06-13T00:46:13+00:00

I have the following jQuery click() function that needs to send the form data

  • 0

I have the following jQuery click() function that needs to send the form data via ajax to the database.

$("#maandbutton").live('click', function(event) {
    $.get("ajax.php",{"action":"addm","maandtekst":$('#maandtekstinput').val(),"maand":$('#maandselect').val(),"bovenonder":$('#bovenonder').val()},function(msg){
       $("#maandtable").append($('<tr><td class="left">' + $('#maandtekstinput').val() + '</td><td class="right">' + $('#bovenonder').val() + '</td><td class="right">' + $('#maandselect').val() + '</td><td class="icon"></td></tr>'));
       $('table.zebra tr').removeClass('odd');
       $('table.zebra tr:odd').addClass('odd');
       $('#maandtekstinput').val('');
       $('#maandselect').val('');
       $('#bovenonder').val('');
       $("#maandbutton").button({ disabled: true });
   })
});

The problem is that if the textarea #maandtekstinput has to much text in it, only the append is working, but the data doesn’t reach my sql database.

My ajax.php script has a simple switch statement.

$maandtekst = htmlspecialchars($_GET['maandtekst']);

switch($_GET['action'])
{
    case 'addm':
        $query = "INSERT INTO `site_maandteksten` (`id`, `maand`, `bovenonder`, `tekst`) VALUES (NULL, '".$maand."', '".$bovenonder."', '".htmlspecialchars_decode($maandtekst)."')";
        $result = mysql_query($query) or die(mysql_error());
        break;
}

I’m wondering why my script doesn’t deliver my textarea text to the database.
In my database it is a long text field with 5000 character space

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:46:15+00:00Added an answer on June 13, 2026 at 12:46 am

    Don’t use a GET query for big data : use a POST one.

       $.post("ajax.php",{"action":"addm","maandtekst":$('#maandtekstinput').val(),"maand":$('#maandselect').val(),"bovenonder":$('#bovenonder').val()},function(msg){
    

    (and in PHP use $_POST or $_REQUEST)

    The problem with GET queries is that the parameters are embedded in the URL, which is limited in size (this limit is browser and server dependent).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following jQuery code: $(.save_button).click(function() { var $form = $(this).closest(div.info_section).find(form); url =
i have the following jQuery code. $(function() { $('.clickme').click(function() { $('.totalthing').slideToggle('slow','easeInOutQuart', function() { //
Assuming I have the following two JQuery functions - The first, which works: $(#myLink_931).click(function
I have the following jquery script: $(function(){ $('#top-menu').on('click', 'a.change-menu', function(e){ e.preventDefault() $(#menu-change-div).load($(this).attr(href)); }); });
If I have following in jQuery $(#someId).add(#someOtherId).bind(click, function(e) {... I get the click bound
I have the following jquery function that submits to an iframe. The message sent
I have the following JQuery code: jQuery(function($) { $j(.follow_btn) .click( function() { var element
I have the following in my Jquery: $(#lnkpwd).click(function () { I have 2 hyperlinks
I have a question about jQuery load best practice. Imagine the following situation: $(#div).on('click',
I have the following jquery code: $(document).ready(function() { $(body[class*=page-calendar-practices] #content-header h1#title).after(<div id='athletics_practice-schedule'><div id='inner-title'><a href='www.example.com'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.