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 8970583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:44:46+00:00 2026-06-15T17:44:46+00:00

Hi guys my form seems to work correctly as in submitting and jquery, although

  • 0

Hi guys my form seems to work correctly as in submitting and jquery, although two things: it doesn’t seem to take the information through as it keeps adding 0, 0, 0, 0 as opposed to the things I submit in the form. and next it doesn’t refresh the page afterwards? probably something jquery missing?

insert function in model:

    function entry_insert(){
    $this->load->helper('form'); 
    $this->load->helper('html'); 
    $this->load->database();
    $data = array(
              'title'=>$this->input->post('title'),
              'url'=>$this->input->post('url'),
          'jscore'=>$this->input->post('jscore'),
          'kscore'=>$this->input->post('kscore')
            );
    $this->db->insert('movies',$data);
  }

this is the controller function which gets called by the jquery loading the model:

 public function addmovie()
{
        $this->load->model('Movie_model', '', TRUE);
        $this->Movie_model->entry_insert();
        return true;


}

html form inside the view:

<form class="form-signin" method="post" id="form-signin">
    <h4 class="form-signin-heading">Add a Movie</h4>
    <input type="text" class="input-block-level" placeholder="Movie Title" id="title">
    <input type="text" class="input-block-level" placeholder="URL" id="url">
    <input type="number" class="" min="1" max="100" placeholder="Jamies Score" id="jscore">
    <input type="number" class="" min="1" max="100" placeholder="Kellys Score" id="kscore">
    <button class="btn btn-large btn-primary" type="submit">Add</button>
  </form>

and finally the jquery:

<script>
$(function(){
   $("#form-signin").submit(function(){
     dataString = $("#form-signin").serialize();

     $.ajax({
       type: "POST",
       url: "http://xxx.com/xx/index.php/welcome/addmovie",
       data: dataString,

       success: function(data){
           alert('Successful!');
       }

     });

     return false;  //stop the actual form post !important!

  });
});
</script>

can anyone spot what I am doing wrong? and maybe help my jquery refresh?

  • 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-15T17:44:47+00:00Added an answer on June 15, 2026 at 5:44 pm

    None of your inputs have name attributes, which is required to read the values on the server side, and your serialize() call is probably returning nothing as well. I guess you thought that’s what id is for, but it’s not.

    Example:

    <input placeholder="Kellys Score" id="kscore">
    

    Should be:

    <input placeholder="Kellys Score" name="kscore" id="kscore">
    <!--                   Needs this ^^^^^^^^^^^^^          -->
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, I am trying to run a proccess by submitting an AJAX form:
I'm currently doing a live search form based on Jquery/ajax/php, but it dosent seems
I'm mainly a jquery dev, and i work on a struts 2/spring/hibernate form application.
So, i have this code that seems to be doing the mechanical work correctly,
Hi guys I have a problem with cookies on firefox I'm submitting a form
Hie guys i need help with my code. I have a form where a
Hay guys, I'm doing some work where i have a large collection of forms.
I have the following form: Seems easy to validate but now I have some
hey guys, i can't seem to get it working. i have a div.post with
Hey guys, I've downloaded an auto-complete script in jQuery from formvega (http://www.fromvega.com) and I've

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.