can anyone help me out...
i have a login page...in php and i am doing the validations...but unable to redirect to my homepage...
header("Location:http://www.searchyd.com/index.php");
warning message:Cannot modify header information - headers already sent by (output started at /var/www/vhosts/searchyd.com/httpdocs/user/db.php:2)
redirecting header
Moderator: General Moderators
- ambivalent
- Forum Contributor
- Posts: 173
- Joined: Thu Apr 14, 2005 8:58 pm
- Location: Toronto, ON
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: redirecting header
Just as an FYI, this error has been posted in this community like ten times in the last two weeks. Did you search first before posting? I am not trying to be rude, just trying to keep you coming back.rambabu wrote:can anyone help me out...
i have a login page...in php and i am doing the validations...but unable to redirect to my homepage...
header("Location:http://www.searchyd.com/index.php");
warning message:Cannot modify header information - headers already sent by (output started at /var/www/vhosts/searchyd.com/httpdocs/user/db.php:2)
The error you are getting is because you are sending output to the browser at some point prior to your posted call to header(). Once anything has been sent to the browser you will get that error when using header().