Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5939651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:51:29+00:00 2026-05-22T15:51:29+00:00

within my login code (index.php) there is a section for facebook login. it checks

  • 0

within my login code (index.php) there is a section for facebook login. it checks whether or not the user has been logged in. now i can’t use headers to redirect the user to a different page because it produces the error

Warning: Cannot modify header information - headers already sent by

(output started at
C:\xampp\htdocs\kite\index.php:81) in
C:\xampp\htdocs\kite\index.php on line
196

so as a result i’ve resorted to using to meta-refresh

    <?php 
                //if user is logged in already
                if ($user): ?>
                <?php 
                //redirect them to the user sonline page
echo '<META HTTP-EQUIV="Refresh" Content="1; URL=main.php">'; 
                //if user is not logged in
                else: ?>
                <input name="fblogin" type="button" value="Login with Facebook" class="fblogin" onclick="location.href='<?php echo $loginUrl; ?>'"/>
                <?php endif ?>

what are the advantages and disadvantages of this method?

thanking you in advance


all i have on line 81 is

<?php // include the hashing class  
require ("resources/phpass/PasswordHash.php"); 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:51:30+00:00Added an answer on May 22, 2026 at 3:51 pm

    In login and logout context, header() will stop the browser from caching the page, which stores some sensitive information of the user.

    You need to send header BEFORE any of your HTML will be displayed.

    There are some more reasons behind header(), to make it preferable to the developers. But in login context, I think that’s enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using the ASP.net membership system, with code such as: <asp:Login id=Login1
Within SQL Server Integration Services (SSIS) there is the ability to setup a connection
I am using the core Auth component. I have created a user login that
I'm writing an iPhone program that has a login view controller that allows the
Within an application, I've got Secret Keys uses to calculate a hash for an
Within Ruby on Rails applications database.yml is a plain text file that stores database
Within c#, I need to be able to Connect to a remote system, specifying
Within our Active Directory domain, we have a MS SQL 2005 server, and a
Within your organization, is every developer required to lock his workstation when leaving it?
Within a stored procedure, another stored procedure is being called within a cursor. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.