rstaib / jquery-steps

A powerful jQuery wizard plugin that supports accessibility and HTML5.
http://www.jquery-steps.com
MIT License
1.69k stars 778 forks source link

How to submit data to database through php #305

Open anilblogspot opened 4 years ago

anilblogspot commented 4 years ago

Hi Kindly help me up with the issue :

I want to submit the data from index.php file where steps wizard code is added i want to push the data to mysql database tell me how to add url of submit data or an other method to send data to mysql

rahulkp220 commented 4 years ago

I guess you can use ajax within the onFinished attribute of the code. See here http://www.jquery-steps.com/Examples#advanced-form

var form = $("#example-form");
form.validate({
    errorPlacement: function errorPlacement(error, element) { element.before(error); },
    rules: {
        confirm: {
            equalTo: "#password"
        }
    }
});
form.children("div").steps({
    headerTag: "h3",
    bodyTag: "section",
    transitionEffect: "slideLeft",
    onStepChanging: function (event, currentIndex, newIndex)
    {
        form.validate().settings.ignore = ":disabled,:hidden";
        return form.valid();
    },
    onFinishing: function (event, currentIndex)
    {
        form.validate().settings.ignore = ":disabled";
        return form.valid();
    },
    onFinished: function (event, currentIndex)
    {
        alert("Submitted!");
    }
});