In the previous lesson we deleted records from our database using the S Q Well 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 will take the user back to the main page as soon as the record
has been deleted.
This can be done using the header function the header function sends a raw HDP header to a client in
order to use it replace your echo statement in the DL user dot HP file with the following syntax
here we've instructed the header function to go back to the delete dot P. HP page.
Once the record has been deleted so I'll save the file they'll refresh.
So I want to delete record 14 I d 40 and you can see that it redirects back to the page
this way you don't have to press the back one.