austine_power007 Posted November 23, 2006 Share Posted November 23, 2006 [size=10pt]I want a script that will redirect a user to his profile after " login successful " if it is wrong it will redirect to login page .........can anybody send me a sample code or any idea?[/size] ??? Quote Link to comment Share on other sites More sharing options...
btherl Posted November 23, 2006 Share Posted November 23, 2006 This code, when used before ANY html output, will redirect the user:[code=php:0]header('Location: http://site.com/page.html');exit(0);[/code]If you have displayed any HTML before using that, then you will get an error.An alternative is to use a meta refresh tag, which I don't remember the syntax for. Quote Link to comment Share on other sites More sharing options...
austine_power007 Posted November 23, 2006 Author Share Posted November 23, 2006 [quote author=btherl link=topic=116000.msg472438#msg472438 date=1164255761]This code, when used before ANY html output, will redirect the user:[code=php:0]header('Location: http://site.com/page.html');exit(0);[/code]If you have displayed any HTML before using that, then you will get an error.An alternative is to use a meta refresh tag, which I don't remember the syntax for.[/quote]Thanks a lot man it helps me a lot. Problem solved and topic Closed. :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.