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

  • Home
  • SEARCH
  • 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 7029697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:34:23+00:00 2026-05-28T00:34:23+00:00

I have this code right here: $(‘#add_club_button’).click(function(){ $(‘#add_club_button_ajax’).show(); $.post(‘<?php echo base_url()?>addClub/save’,$(‘#add_club_form’).serialize(),function(data){ if(data == ‘OK’){

  • 0

I have this code right here:

$('#add_club_button').click(function(){
    $('#add_club_button_ajax').show();
    $.post('<?php echo base_url()?>addClub/save',$('#add_club_form').serialize(),function(data){
        if(data == 'OK'){               
            //refresh
            $('#add_club_button_ajax').click(function() {
                      location.reload();
            });             

             $.unblockUI(); //unblock
            $('#add_club_button_ajax').hide();                  

        }
        //c(data);
    });     
});

What I want is to store the data I get from POST (e.g. id and name) to the database. My problem is that I don’t know how to get the data I get from POST.

  • 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-05-28T00:34:23+00:00Added an answer on May 28, 2026 at 12:34 am

    If you plan to store to a server-side database, you need to use a server side language like PHP to accept your HTML POST variables, prepare them, and process them to the database.

    <?PHP
    mysql_connect('', '', '');
    mysql_select_db('') or die("Could not connect to DB");
    
    $variable = mysql_real_escape_string($_POST['variable']);
    
    $sql = mysql_query('INSERT INTO "table" ("variable", "") VALUES ("' . $variable . '", ""');
    ?>
    

    Submit your HTML form to a php script containing something like my example above. There is no real need to use jQuery unless you are using it for other reasons than just submitting a form.

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

Sidebar

Related Questions

Hey I have this code right here: http://pastie.org/534470 And on line 109 I get
I have this code right here to retrive the IP-address from a hostname: program
I have this piece of code right here , I really don't get it
I have this code here: case 'resource_list': if(file_exists('content.php')){ include('../ajax/content.php'); } else { die('does not
I have this HTML code right here.. <ul> <li><a href=# id=0>Services</a></li> <li><a href=# id=1>Portfolio</a></li>
I have this code right here: // get host name from URL preg_match('@^(?:http://)?([^/]+)@i', http://www.joomla.subdomain.php.net/index.html,
I have this code right now to get the row value from jquery grid..
I have this code which compiles and works as expected: class Right {}; class
I have this code <a href=#> <span style=border-right: medium none; class=Yes>Yes</span> </a> <a href=#>
Right now, I have this code where $obj_arr maybe contain array and an object.

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.