How to show Success Message / Flash message in PHP
In this article, we will learn how to show success message after completing a task. You will learn how to use sessions in php and use sessions to set the flash message and display them after success.
Note : To use session in any page, we need to start the session on top of the page using the session_start();
After inserting / updating the data in the database, set the session message in a session variable as shown below:
Now we have set the message and now paste the below code in the page where you want display the success message :
Note : Import the Bootstrap v5 CSS and JS using the cdn link available on getboostrap.com.
Thanks for reading ;-)
© Copyright - 2018 - 2021 | All rights reserved at Funda of Web IT