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:

Professional Opinions
Ask a Question
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

troubleshooting Question

PHP Contact Form with success notification on site rather than on a popup

Avatar of gwarcher
gwarcher asked on
PHPScripting Languages
3 Comments1 Solution587 ViewsLast Modified:
I put together a very simple PHP form to use with my company's website.  So far it is successful, but I am not sure how to make it so that the success or failure string is called to the body of the website rather than in a seperate blank site.

Thanks for the help as always!
   <form action="contact.php" method="get" target="_blank">   
                                <h3>Please send us your questions and comments.</h3>
                                <div class="style1">Name: </div>
                                <div><input type="text" size="50" maxlenth="65" name="your_name" /></div>
                                <div class="style1">Email:</div>
                                <div><input type="text" size="50" maxlength="650" name="your_email" /></div>
                                <div class="style1">Message:</div>
                                <div><textarea name="message" cols="50" rows="10"></textarea></div>
                                <div><input type="reset" value="[ CLEAR ]" /></div>
                                <div><input type="submit" value="[ SUBMIT ]"  /></div>
$subject="from ".$_GET['your_name'];
$headers= "From: ".$_GET['your_email']."\n";
 $headers.='Content-type: text/html; charset=iso-8859-1';
mail("info@mycompany.com", $subject,  "
 <title>Website Contact Form</title>
</html>" , $headers);
echo ("Your message was successfully sent!");
Avatar of iDeej
iDeejFlag of Australia image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers