- Where Developers Learn, Share, & Build Careers


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 & lt; Head & gt; Keep in:

  & lt; Meta http-equiv = "refresh" content = "5; URL = 'http: //example.com/' & gt;   

You can also do this with an HTTP header Are:

  header ('refresh: 5; URL =' http: //example.com/ ');   

or use JavaScript :

  & lt; script type = "text / javascript"> function delayed () {window.location = "http://example.com/"} & lt; / Script & gt; & lt; body onLoad = "setTimeout ('Defective Redirect ()', 3000)" & gt;    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -