I want get the values of the form into my 'getdata.php'. Actually its a form wizard that I found while searching.

Below is the javascript:-

<script type="text/javascript">
            $(function(){
                $("#demoForm").formwizard({ 
                    formPluginEnabled: true,
                    validationEnabled: true,
                    focusFirstInput : true,
                    formOptions :{
                        success: function(data){$("#status").fadeTo(500,1,function(){ $(this).html("You are now registered!").fadeTo(5000, 0); })},
                        beforeSubmit: function(data){$("#data").html("data sent to the server: " + $.param(data));},
                        dataType: 'json',
                        resetForm: true
                    }   
                 }
                );
        });
    </script>

When i click submit its prints this:-
data sent to the server: firstname=jackie&surname=chan&day=DD&month=MM&year=YYYY&lastFour=XXXX&countryPrefix=%2B358&areaCode=&phoneNumber=&myemail=sdfdf%40hotmdei.cpo&username=sdfds&password=sdfsd&retypePassword=fsdfdsf

But what i want is to send thaose values to my 'getdata.php' so that i can save them into the database.
Need help please!!!!!!!

Thanks..

From what you've given, there is no way to tell if you failed to submit.
I don't know what code library you're using and I don't really care to find out about its semantics, either.

For all I know, this data is successfully passed to getdata.php.
Why don't you make getdata.php perform the SQL query, and then check to see if it added a row.
Even better, have getdata.php echo something, and then when you receive the response from POST, you can draw it into a text box on the current page. That last request might be difficult for you, but you could at least provide some way of knowing if the request worked at all.

Also, it might help for you to include the HTML of #demoForm

I have the feeling that the success method (where it shows the data) is the success of a javascript form validation plugin. To send it, you'll have to submit the form, either directly to your getdata script, or use jQuery's ajax method to do so.

I just added a insert query and it does adds into database....Silly me!!!

@Unimportant, @pritaeas
Thanks guys

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.