After the person submits the form, I would like to show a Thank You mes

  • Profile Image
    RCinSTP
    Asked on November 27, 2014 at 12:59 PM

    After the person submits the form, I would like to show a Thank You message. Is there some sort of code like below that could be place near the end of the php code?

    if (mysql_query) === TRUE) {

    echo "Thanks Dude!";

    }



    This is a re-post of a comment on How to send Submissions to Your MySQL Database Using PHP

  • Profile Image
    Kiran
    Answered on November 27, 2014 at 03:04 PM

    The easiest way can be placing an echo statement with your message right before PHP closing tag.

    echo "Thank you for submitting";

    ?>

    Since there is a die function for both queries and if the query fails, the die function stops executing rest of the script. If the query is executed without any issue, your message will be printed on the screen.

    Hope this information helps. Let us know if you need further assistance in this regard. We will be happy to help.

    Thank you!