For example, if they didn't enter an email address, then this opens in a new window, but I need it in the same window. Current code:
// Error message displays if email is missing
if (!$from){$errorMes3="ERROR: You didn't enter your email address. "; $error=1; }
Also, success message needs to be in same box and redirect to same page, Current c开发者_运维问答ode:
// display mail sent message
else {
echo (" <title>SendMail Notice: mail was successfully sent</title><body><br><br><br><br>
    <p style=\"font:11pt arial\" align=left>Your message has been successfully sent.
    <br><br><i>Thank you</i></p>
    </body></html>"); exit(0);
I used a contact form where it was already integrated and that solved the problem. works great now!
try with form action $_SERVER['PHP_SELF'] and for the error & success messages you need to check the validations on the same page.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论