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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:04:36+00:00 2026-05-24T04:04:36+00:00

i have large form in my website and using serialize() to process the form.

  • 0

i have large form in my website and using serialize() to process the form.

my problem is:
the result always return false after the form has been completed! i checked using firebug. if false, the result being shown. it was actually data.ok == true had been called, but it didnt show the message in the page? and it didnt redirect the page to the destination address?

jquery ajax:

$("#details").live("submit", function(e){
   var form = $(this).serialize();
   var data_string = form;
   $.ajax({
            type: "post",
            url: "../_include/ajax.php?details",
            cache: false,
            data: data_string,
            dataType: "json",
            success: function(data) {
                if(data.ok) {
                    ("#pop").html(data.message).addClass("oke").fadeIn("slow");
                    setInterval(function() {
                        location.href = data.redirect
                    },2000)

                } else {
                    $("#pop").html(data.message).addClass("warning").fadeIn("slow");
                }

            }
        });

        e.preventDefault();
})

in PHP:

if (isset($_GET['details'])) {

    if (empty($name)) {
            $data['ok'] = false;
            $data['message'] = 'Please enter name!';
    } ................ {
            .............
    } else {
      $db->query("UPDATE query....");
      $data['ok'] = true;
      $data['message'] = 'Your details has been submitted!';
      $data['redirect'] = 'index.php?p=details';
    }


echo json_encode($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-24T04:04:37+00:00Added an answer on May 24, 2026 at 4:04 am

    You appear to have a syntax error in your success function (if that’s not a copy/paste error):

    ("#pop").html(data.message).addClass("oke").fadeIn("slow");
    

    should be:

    $("#pop").html(data.message).addClass("oke").fadeIn("slow");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large form that has all 50 states listed as checkboxes. Instead
I have created a large form for my website and I have tried to
I have recently inherited a large website. I have been checking it for security
I have a form with a textarea that can contain large amounts of content
I'm developing a website in PHP and I have large JS files that I
I have a large form built with twitter's bootstrap kit. The fields look like
I have a large web form application that I want to allow the user
Hey. We're building a large ASP.NET website, and have hired an external firm to
I have a large validation form that is working very well except for one
I have a fairly large input form with a number of ASP.NET Validators on

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.