Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6906843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:21:40+00:00 2026-05-27T08:21:40+00:00

I’m having a very hard time understanding the jQuery Form Plugin. I’ve read through

  • 0

I’m having a very hard time understanding the jQuery Form Plugin. I’ve read through and studied many similar questions on stackoverflow, but I still can’t figure out what I need to do to get it working.

My goal is the following:

  1. Create a contact form on an HTML page
  2. Send the contents of the form to a separate PHP script to be validated and emailed.
  3. Show an AJAX auto-response on the HTML page containing the contact form without the page having to refresh.

I have set up an example at http://evanwebdesign.com/ajax-submit-test/ where you can view the HTML form and my jQuery/javascript. (Don’t mind the fact that the form is ugly/unstyled and contains no front-end validation. I will handle that stuff later on my own.)

Below is the PHP code for contact-process.php:

<?php
  $first_name = $_REQUEST['First_Name'] ;
  $last_name = $_REQUEST['Last_Name'] ;
  $email = $_REQUEST['Email'] ;
  $phone = $_REQUEST['Phone'] ;
  $message = $_REQUEST['Message'] ;

   $body =  "Submitted Information:\n";
   $body .= "   First Name: $first_name\n";
   $body .= "   Last Name: $last_name\n";
   $body .= "   Email: $email\n";
   $body .= "   Phone: $phone\n";
   $body .= "   message: $message\n";


  if ( preg_match( "/[\r\n]/", $name ) || preg_match( "/[\r\n]/", $email ) ) {
    header("Location: http://www.google.com/");
    }


  mail( "myemail@mywebsite.com", "AJAX Form Submission",
    $body, "From: $email" );
?>

What’s happening is the the form is being processed, but upon clicking submit I am taken to the contact-process.php in my browser instead of loading a success notification in the HTML file.

Maybe the problem lies in my PHP script? I’m more of a front-end guy so that could be entirely possible.

Any help in this matter would be greatly appreciated. Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:21:41+00:00Added an answer on May 27, 2026 at 8:21 am

    The following two errors in Firebug shed some light:

    “NetworkError: 404 Not Found –
    http://www.evanwebdesign.com/ajax-submit-test/js/jquery.form.js”
    jquery.form.js

    $(“#contact_form”).ajaxForm is not a function

    You need to properly include the AJAXForm plugin for it to function correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.