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, for good design and results as shown in the above video.
Thanks for reading ;-)
Latest PostsCreate dynamic SQL insert query in php and mysql How to Export MySQL data to excel sheet in PHP How to import excel file into mysql database in PHP How to make Registration / Signup form in php How to upload an image in PHP mysql How to make Login System with Session in PHP MySQL How to Delete data from database in php mysql How to Update Data in MySQL Database in PHP How to Fetch/Retrieve data from database in php mysql How to Insert data into database in php mysql
© Copyright - 2018 - 2022 | All rights reserved at Funda of Web IT