We help IT Professionals succeed at work.
Get Started

Show sucees message on the same page as the form

Last Modified: 2012-07-02
I have an enquiry form that sends using a separate php script. When the forms sends a success message displays on a blank page. How can I get this message to display on the page with the actual form?

This is the part of the php script that deals with the success message

 // now we just send the message
   if (@mail($to, $subject, $message, $headers)) {
      echo "Thanks for sending your details. We will be in touch soon.";
   } else {
      echo "Failed to send";

Open in new window

Watch Question
Top Expert 2010
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE