Register now or log in to join your professional community.
just to make sure that the code after redirect line will not be executed.
Hi @Adel SIr, thanks alot for the this invitation again.
I think the 'header' is only a line of data asking the browser to redirect. We can use this to prevent from the recipient to perform the special hacking skills.
In details, Yes, always. The header is only a line of data asking the browser to redirect. The rest of the page will still be served by PHP and can be looked at by the client by simply preventing the header command from executing.That is easy enough to do with a command-line client like wget, for example, by simply telling it not to follow redirects.Bottom line: If you don't prevent it, PHP will send out the whole body even after a header call. That body is fully available to the recipient without any special hacking skills.
Regards,
adding exit after header is to make sure that code after it won't be executed
to make sure that code below does not get executed after we redirecte to another page
Check https://www.acunetix.com/blog/articles/html-form-found-in-redirect-page/ which shows best answer for that.