Skip to content
Advertisement

After the user clicks submit, the page goes to the php file. How can it remain on the HTML file and submit the form information to the email?

I am a beginner at PHP and was working on a contact form.

After selecting the submit button, the response message is not shown. The page goes to the PHP file and the email is never sent. Also, none of the error messages appear.

I am using validate.js and Jquery form.js. Here is a reference link:http://www.tutwow.com/htmlcss/create-a-simple-and-secure-contact-form-with-jquery-and-php/

The style of the contact form is similar to the one featured on the Clicky Media page (Click get a quote on the site.) HTML:

JavaScript

Javascript:

JavaScript

PHP:

JavaScript

Advertisement

Answer

You are not at all connecting your submitHandler with the <form>‘s submit event. Do this:

JavaScript
Advertisement