In the previous lesson, we deleted records from our database using the SQL DELETE statement.
As you can see, once the record is deleted, a success message is displayed and we have to press the back button to go back to our main page.
We can make the process more seamless, by placing an automatic redirect once the record has been deleted.
This can be done using the header() function.
The header() function sends a raw HTTP header to a client.
Replace your echo statement, in the deluser.php file with the following syntax:
Here, we've instructed the header function to go back to the delete.php page once the record has been deleted.