In PHP, set message after submitting records into the database is very easy. You need to start the session before working with session related work. For example:
<?php session_start(); ?>
Then set a success message after data submit successfully into the MySQL table. try this code.
if($sql){ $_SESSION["success_msg"]="You Data Submit Successful"; header("location:submit_form.php"); }
Display message on the redirect page use this code:
<?php echo $_SESSION["success_msg"]; ?>
Question and answer is powered by AnsPress.io