Jump to content

[SOLVED] header problem...


onewaylife

Recommended Posts

Dear all

I am creating web site. in that when user is logined i validate the user and after validating the user & pass, i am creating session and redirecting the user to his welcome page like for admin - admin page etc..

my problem is i am using header function for redirecting but the page is remain same.

 

regards

onewaylife

Link to comment
https://forums.phpfreaks.com/topic/40483-solved-header-problem/
Share on other sites

header function does not redirect properly if there is some output already sent before redirecting.

You also see some errors saying 'headers already sent' or somethign like this. You should try putting:

 

<?php
ob_start();

 

at the top of page before anything else on the page after starting <?php tag. So now all the output will be buffered and you should be able to redirect properly.

Link to comment
https://forums.phpfreaks.com/topic/40483-solved-header-problem/#findComment-195924
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.