Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Sep 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy php login question

    Hi, I'm using this php script :
    http://www.phpbuddy.com/article.php?id=23

    to protect another php page :export_osa_form.php.

    The login works except I get this error message:

    Warning: Cannot add header information - headers already sent by (output started at /home/osaproject/export_osa_form.php:2) in /home/osaproject/export_osa_form.php on line 95

    Warning: Cannot add header information - headers already sent by (output started at /home/osaproject/export_osa_form.php:2) in /home/osaproject/export_osa_form.php on line 96

    Warning: Cannot add header information - headers already sent by (output started at /home/osaproject/export_osa_form.php:2) in /home/osaproject/export_osa_form.php on line 97


    The export.php file fetches values from a MySQL databse table and once prompted, it shows a open/save window that opens the values in excel..when i use this script though.. the files are fetched but they are displayed in html instead of prompting the .csv file download.

    Location:
    http://redhat.cob.sjsu.edu/osaprojec...t_osa_form.php
    ID: admin
    PASS: osa
    attached are both files I'm refferring to.

    Any help is appreciated.
    cheers
    Attached Files Attached Files
    Last edited by farfetched; 12-05-2003 at 08:09 PM.

  • #2
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You cannot send headers before the ouput of any HTML.
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #3
    New Coder
    Join Date
    Sep 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So how do i fix it???

  • #4
    New Coder
    Join Date
    Sep 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    nevermind i figured it out! thx

  • #5
    New Coder
    Join Date
    Dec 2003
    Location
    Miami, FL
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    BTW, u can use ob_start(); and ob_end_flush(); to buffer all outputs before actually sending them. with this u can star a header information even at the very end of your code
    MeGa MaX
    Be the Best, but don't Believe it.


  •  

    Posting Permissions

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