By “instead of directing to a new page” do you mean to keep the code in the same file as StarLion suggests, or do you mean you want to use AJAX to handle the form submission so there is no page redraw in the browser?
By “instead of directing to a new page” do you mean to keep the code in the same file as StarLion suggests, or do you mean you want to use AJAX to handle the form submission so there is no page redraw in the browser?