...

View Full Version : php login question



farfetched
12-05-2003, 07:45 PM
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/osaproject/export_osa_form.php
ID: admin
PASS: osa
attached are both files I'm refferring to.

Any help is appreciated.
cheers

SDP2006
12-05-2003, 10:28 PM
You cannot send headers before the ouput of any HTML.

farfetched
12-05-2003, 10:51 PM
So how do i fix it???

farfetched
12-05-2003, 11:41 PM
nevermind i figured it out! thx

MeGa
12-08-2003, 05:02 AM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum