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] ??? Link to comment https://forums.phpfreaks.com/topic/28195-redirect-page/ 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. Link to comment https://forums.phpfreaks.com/topic/28195-redirect-page/#findComment-128951 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. :) Link to comment https://forums.phpfreaks.com/topic/28195-redirect-page/#findComment-128954 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.