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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:17:23+00:00 2026-05-14T06:17:23+00:00

Have a simple form (only extract fields here) but for some reason the JQserilization

  • 0

Have a simple form (only extract fields here) but for some reason the JQserilization is not working; looks fine in alert() but only the first form field gets posts. Suggestions please – thanks in advance

Form:

<form id="neweventform" method="post" action="">
<div class="grid_4 alpha">Setup date *</div>
<div class="grid_7 omega">
<select name="setup_day" id="setup_day"><?php days_list(); ?></select>
<select name="setup_month" id="setup_month"><?php month_list(); ?></select>
<select name="setup_year" id="setup_year"><?php year_list(); ?></select> 
<div class="grid_11">
<input type="submit" name="createevent" value="Create" id="createevent" />
</div>
</form>

Jquery

$j(document).ready(function(){
$j('#neweventform').live('submit',function () {
var data= $j('#neweventform').serialize();
alert(data);
$j.ajax({type: "POST", url: "scripts/process.php",data: "newevent=newevent&event_options=" + data, cache: false, complete: function(data){ 
$j('#neweventform').fadeOut(2000),loading.fadeOut('slow'),$j('#content').fadeIn(2000), $j('#content').load('scripts/events.php #eventslist'); 
}
});
return false;
});
});

And the PHP processing

if(isset($_POST['newevent'])) :
$insert = mysql_query("INSERT INTO events (event_options) VALUES ('".$_POST['event_options']."')");
endif;

Any suggestions?

  • 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-14T06:17:23+00:00Added an answer on May 14, 2026 at 6:17 am

    OK, tried a mix of, but eventually got this to work:

    $j(document).ready(function(){
        $j('#neweventform').live('submit',function () {
            var optdata= $j('#neweventform').serialize();
            $j.ajax({
                type: "POST", 
                url: "scripts/process.php",
            data: "newevent=" + $j('#neweventform').serialize(),
            cache: false, 
                complete: function(data) { 
                    $j('#neweventform').fadeOut(2000),
                loading.fadeOut('slow'),
                $j('#content').fadeIn(2000), 
                $j('#content').load('scripts/events.php #eventslist'); 
                }
            });
            return false;
       });
    

    });

    then in the PHP

    if(isset($_POST['newevent'])) :
        $tryit  = serialize($_POST);
        $insert = mysql_query("INSERT INTO events (event_options) VALUES ('".$tryit."')");
    endif;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty simple form with some fields from a doctrine model. $this->widgetSchema['fields']
I have simple form like this which accepts only two values string action and
I have a simple form that looks like this: <%= simple_form_for @study,:url => studies_path,
I have a simple form that looks like so <% remote_form_for post, :url =>
I have a simple login form that has 2 text fields and a button.
I have a simple 'Working' form that runs on its own thread to keep
I have a simple form with four select fields. If YES is selected on
I have a simple form all the fields work perfectly and the data is
We have a simple registration form for our website users where we only require
I have a simple form that looks like this: <form action=# name=submit method=post> <input

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.