Results 1 to 4 of 4

Thread: [RESOLVED] Problem about header("location:..")

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    47

    Resolved [RESOLVED] Problem about header("location:..")

    Hi friends,
    I get warning message like :
    "Warning: Cannot modify header information - headers already sent by (output started at G:\AppServ\www\Indikator\in_indikator.php:97) in G:\AppServ\www\Indikator\in_indikator.php on line 113"

    In my source i have :

    <? include "config.php";
    if(!isset($_SESSION["Username"]))
    {
    header("location:Login.php");
    }
    ?>
    .
    . //This HTML Code
    .
    <?
    if(!isset($Register))
    {
    header("location:in_register.php");
    }
    $query=mysql_query("Select MRN,Code,Name,DocId,Pav,Release From Register where Kode='" . $Register . "'",$con);


    if (mysql_num_rows($query)>0)
    {
    $qry2=mysql_query("Select MRN,Code From Indikator where Kode='".$Register."'",$con);
    if(mysql_num_rows($qry2)>0)
    {
    header("location:in_register.php?pesan='Register already existed'"); // This is line 113
    }
    $hasil=mysql_fetch_row($query);
    }
    ?>

    Is there any solution ???
    Thank You for your help ....

  2. #2
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    Re: Problem about header("location:..")


  3. #3
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    Re: Problem about header("location:..")

    if your running it on your own pc go to your php.ini and set output_buffering = Off.

  4. #4

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    47

    Re: Problem about header("location:..")

    It looks like i place my code after html tag.... It must be before html tag
    Ok Thank you for your help.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width