0

Ok so I found this multi page form made with javascript here http://xoxco.com/projects/code/multipage/. It's the best thing I found since I'm not experienced with javascript but now my problem is how do I take the submit button and link that to a php file to process the request?

<script type="text/javascript">
    $(window).ready(function() {
        $('#multipage').multipage();
        $('form').submit(function(){
            alert("Submitted!");
            return false;
        });
    });
</script>

That's the script file for the html. Like where would I put the method?

Also, is there anyway to make it so when I have a email field, for the javascript to validate it since html5 can't.

dashtinejad
  • 6,193
  • 4
  • 28
  • 44
user1585549
  • 3
  • 1
  • 4
  • This answers your first question -- http://stackoverflow.com/questions/19029703/jquery-using-ajax-to-send-data-and-save-in-php --- HTML can validate email, just use () – Tasos Sep 21 '14 at 03:06

1 Answers1

0

You can do an ajax call to your php script. Here probably you will use a POST request since you might want to store the form info into your database. In HTML5, if your input type is email, then it will be automatically validated. Look here for more info.

Community
  • 1
  • 1
user1719160
  • 137
  • 1
  • 3
  • 12