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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:43:57+00:00 2026-06-08T19:43:57+00:00

I have a basic form that asks for certain information and then validates the

  • 0

I have a basic form that asks for certain information and then validates the form using javascript before actually submitting it to a seperate php file to email the form submission to me however, after successfully submitting the form, it goes to blank page and then a Thank you popup shows up. How do I set it so hitting the submit button doesn’t go to a new page but just displays the popup on the current page?

My code for filling out the form is:

<form action="send_group.php" method="post" onsubmit='return formValidator()'>
//Asks to input information
    <input type="submit" value="Submit" />
</form>

My PHP code is:

<?php
$webmaster_email = "email@email.com"; //E-mail the message will be sent to

$info = $_REQUEST['info'] ;
$info1= $_REQUEST['info1'] ;
$info2= $_REQUEST['info2'] ;
$info3= $_REQUEST['info4'] ;

mail( "$webmaster_email", "Information Form Submission",
    "Info: $info
Info1: $info1
Info2: $info2
Info3: $info3" );

echo "<script type='text/javascript'>\n";
echo "alert('Thank you for your booking request. We will get back to you as soon as possible.');\n";
echo "</script>";
?>
  • 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-08T19:43:59+00:00Added an answer on June 8, 2026 at 7:43 pm

    You have to use an AJAX request.
    So you bind an onclick event on your submit button, then you send an AJAX request, and when the AJAX request suceeded you display your response (Bad or not).
    JQuery is really powerful and easy for AJAX request, look here : http://api.jquery.com/jQuery.ajax/

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

Sidebar

Related Questions

I have a basic form that I'm using for member registration. I'm using the
I have a basic form that I am using as a dummy to test
I have a basic html form that adds some data to the page using
I have a multipart form that takes basic user information at the beginning with
I am using Visual Studio 2008. I have created a visual basic form that
I have a basic form that asks the user to enter some text in
I have a basic HTML form that I am centering. I am using jQuery
I have a basic form that I would like to submit using ajax, without
This is probably a basic html/css question... I have a simple one-button form that
I am using grails and i have a basic form remote <g:formRemote name=add onSuccess=close();

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.