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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:09:06+00:00 2026-05-24T06:09:06+00:00

why my code have this error, after click on button submit and click on

  • 0

why my code have this error, after click on button submit and click on link search:
i use of codeigniter.

An error has occured:
[object Object]
error

and this my Tour_foreign->CI_Controller:

function search_customer(){ 
    $customer_number = $this->input->post('customer_number');
    $query = $this->db->get_where('customer', array('customer_number' => $customer_number));
    if($query->num_rows()==0){
                echo '0';
            }else{
                $data = array();
                foreach ($query->result() as $row)
                {
                   $data[] = $row;
                }
                echo json_encode($data);
            }
    }

function insert_customers(){
    $customer_number = "";
    for($i = 0; $i < 10; $i++)
    $customer_number .= mt_rand(0, 9);
    /*////////////////////////////////////*/
    $jdate = jgmdate("j F Y");
        /*////////////////////////////////////*/
        $useradmin = $this->session->userdata('login');
        $query = $this->db->get_where('login', array('useradmin' => $useradmin))->row();
        $nameadmin = $query->nameadmin;
        $lastnameadmin = $query->lastnameadmin;
        /*////////////////////////////////////*/
    $data = array (
                'customer_number' => $customer_number,
        'name' => $this->input->post('name'),
        'name_en' => $this->input->post('name_en'),
        'father_name' => $this->input->post('father_name'),
        'number_birth_certificate' => $this->input->post('number_birth_certificate'),
        'national_number' => $this->input->post('national_number'),
        'passport_number' => $this->input->post('passport_number'),
        'term_passport' => $this->input->post('term_passport'),
        'date_of_birth' => $this->input->post('date_of_birth') ,
                'phone' => $this->input->post('phone'),
        'mobile' => $this->input->post('mobile'),
                'address' => $this->input->post('address'),
                'nationality' => $this->input->post('nationality'),
        'accommodation' => $this->input->post('accommodation'),
        'education' => $this->input->post('education'),
        'zip_code' => $this->input->post('zip_code'),
        'marital_status' => $this->input->post('marital_status'),
        'bank_name' => $this->input->post('bank_name'),
                'branch_name' => $this->input->post('branch_name'),
        'card_number' => $this->input->post('card_number'),
        'account_number' => $this->input->post('account_number'),
        'zip_code' => $this->input->post('zip_code'),
        'job' => $this->input->post('job'),
                'date_submit' => $jdate,
        'useradmin_submit' => $nameadmin.'&nbsp;'.$lastnameadmin ,
    );
    //if(!empty($data)){
        $this->db->insert('customer', $data);
        //}
    }
  • 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-24T06:09:07+00:00Added an answer on May 24, 2026 at 6:09 am

    When I try to use this script I see the following error in the firebug’s console:
    NetworkError: 500 Internal Server Error

    This is the reason why error is showing up. Fix the server part.
    Try to clean all the code inside search_customer() function and see if it runs. If this method never is executed then the problem is outside – in your framework?

    Then, line by line see what is happening on the server. It can be problem with the query? But usually error 500 is when you have problem with mod_rewrite.

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

Sidebar

Related Questions

I get this error, while I'm testing the code below: You have an error
I have this in my code: SelectList(blah, blah, blah, cu.Customer.CustomerID.ToString()) It gives a error
this is my code and have a error: $('#map_canvas').mouseover(function(e){ console.log(e.offset().left+' '+e.offset().top) }) thanks i
I have 1 compiler error. It is from this line in my code: cout
I have a form on which I use validation. This form has a section
I use this to hide keyboard when i click done button or outside of
I wrote this code I have these errors Cannot implicitly convert type x.Program.TreeNode' to
I have created this code, and when I run it, don't get any errors
Hi guys I wrote this code and i have two errors. Invalid rank specifier:
I have this code in jQuery, that I want to reimplement with the prototype

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.