anshu anshu -3 years ago 98
PHP Question

PHP Page redirection with javascript

a small problem ! I have a login form in a PHP file. I have used javascript validation for the form. On a login success scenario i am redirecting the user to their home page.

I have used


I know that the header must be before any output must be sent to the browser. My question is there any walk around to do this redirection?

Answer Source

You could use

    window.location = '';

to redirect after the headers are sent.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download