php - Redirect User to Login Page if Email is Confirmed -
So on my website I send an email with links to which the user should follow to verify their email. If the user clicks the link in the email, then I want the user to be taken to the page which thank you for confirming his / her account, and then redirect the user to the login page. how can I do this? I tried to use the PHP header function but it does not work because I need to send a header to display the "thank you" message, so I can not use that function. What can I do to get this work done?
You can use meta refresh to redirect, a set period of time redirects in 5 seconds To do this, copy this code to You can also do this with an HTTP header Are: or use JavaScript : & lt; Head & gt; Keep in:
& lt; Meta http-equiv = "refresh" content = "5; URL = 'http: //example.com/' & gt;
header ('refresh: 5; URL =' http: //example.com/ ');
& lt; script type = "text / javascript"> function delayed () {window.location = "http://example.com/"} & lt; / Script & gt; & lt; body onLoad = "setTimeout ('Defective Redirect ()', 3000)" & gt;
Comments
Post a Comment