开发者

Need confirmation for contact form to show in same place, not a separate page?

开发者 https://www.devze.com 2023-04-07 01:45 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消