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 8463429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:27:06+00:00 2026-06-10T14:27:06+00:00

I had a contact form that submitted to a php page with this content:

  • 0

I had a contact form that submitted to a php page with this content:

<?php 
$to = 'emailtosendto';
$subject = 'New message from contact form';
$name = $_POST['fullname'];
$mail = $_POST['email'];
$company = $_POST['company']; 
$phone = $_POST['phone']; 
$comment = $_POST['comment'];
$message = $_POST['message'];   
$body = 'Mr/Mrs '.$name.' wishes to contact us.
He\'s from a company called '.$company.'.
You can email him back at '.$mail.', or call him on '.$phone.'.
He was sneaky and found us through '.$comment.'.
He would like to say,
'.$message.'';
ini_set('sendmail_from', '$mail');
mail($to, $subject, $body);
header('location:./?sent');
?>

I have now changed the form to a nice live validated jQuery form, you can see the fiddle of it below.

http://jsfiddle.net/swift29/6UC7m/

I was wodering how I could change any of this code to still do the same function but make it so a popup appears confirming the message has been sent using jQuery then for it to fade back out and the form have been reset

Thanks in advance, Swift

  • 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-06-10T14:27:08+00:00Added an answer on June 10, 2026 at 2:27 pm

    Instead of submitting, you can use AJAX. That way you can get a popup when its done.

    Example:

    $.ajax(
        url:  "urlofscript.php",
        data: {
                  fullname: variableContainingFullname, // i.e. var variableContainingFullname = $("#fullname").var();
                  email:    variableContainingEmail,
                  // etc, all the php variables in POST
              },
        type: "POST",
        success: function(result)
        { 
            alert("DONE"); 
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that has a Contact Form slide down when a link
I had this simple modal contact form working fine but must have broke it
Had a page that was working fine. Only change I made was to add
We had a View Model that looked like this: public class myViewModel { public
Here is my contact function : public static function contact_anon() { $form = new
I have a simple contact form on a website that has 2 text fields,
sorry, I have another problem now. I'm using a new php form method than
My searching skills seems to have failed me. I have this php object that
this may seem trivial but I'm setting up, on a profile form page I'm
I have had contact with Google Chromium Code and that’s terrific for building applications

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.