bs0d |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 11:11 pm on Mar 27 2006
|
|
|
 Member #: 1 Rank: Admin. - (1,506) Since: 02/06/05 Posts: 600 From: USA
|
Yes, did you
skip the part
about using
ob_start(); as
the first line
of your script
(right after
<? )?
|
Viewed: 39,065 Times | |  |
Guest |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 2:19 am on Mar 28 2006
|
|
|
Unregistered
|
Ohh, Only
this!! I
thought it is a
big deal to
correct it..
but I was
wrong; the big
deal acctually
is learning
this
language.
Thank you
admin. it works
just fine..
best Regards.
|
Viewed: 39,060 Times | |  |
Denzel |
Subject: "Another
headers... =("
Posted: @ 3:55 pm on Jul 10 2006
|
|
|
Member #: 163 Rank: User - (14) Since: 05/07/06 Posts: 14 From: Portugal -
Aveiro
|
Warning: Cannot
modify header
information -
headers already
sent by (output
started at
c:\programas\
easyphp1-8\www
\logar.php:9)
in
c:\programas\
easyphp1-8\www
\logar.php on
line 27
Warning: Cannot
modify header
information -
headers already
sent by (output
started at
c:\programas\
easyphp1-8\www
\logar.php:9)
in
c:\programas\
easyphp1-8\www
\logar.php on
line 43
Im having this
problems and im
geting realy
pissed of with
this...
Can someone
help me? Ty..
|
| Viewed: 38,810 Times | |  |
bs0d |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 10:43 pm on Jul 10 2006
|
|
|
 Member #: 1 Rank: Admin. - (1,506) Since: 02/06/05 Posts: 600 From: USA
|
hey as posted
in this thread
just 1 post
above yours, I
say: use
ob_start(); as
the very
first line of
your script.
|
Viewed: 38,803 Times | |  |
Denzel |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 2:03 pm on Jul 11 2006
|
|
|
Member #: 163 Rank: User - (14) Since: 05/07/06 Posts: 14 From: Portugal -
Aveiro
|
i did it! just
copy from the
tutorial and
posted... Still
appears tha
messages... =/
|
| Viewed: 38,796 Times | |  |
bs0d |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 5:10 pm on Jul 11 2006
|
|
|
 Member #: 1 Rank: Admin. - (1,506) Since: 02/06/05 Posts: 600 From: USA
|
Ok then, show
me the code of
logar.php
Keep in mind,
if you have the
code in
logar.php but
are including
logar.php in
another file,
like index.php,
then
ob_start();
needs to be the
1st line of the
file that
you're
including the
login script
in.
|
Viewed: 38,792 Times | |  |
Denzel |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 1:03 am on Jul 12 2006
|
|
|
Member #: 163 Rank: User - (14) Since: 05/07/06 Posts: 14 From: Portugal -
Aveiro
|
Code:
<?
ob_start();
require_once($_
SERVER['DOCUME
NT_ROOT'].'/d
b_connect.php'
);
if(isset($_SESS
ION['username
']) &&
isset($_SESSION
['password'])
) {
//REDIRECT TO
USERS
PROFILE...
header("L
ocation:
http://localhos
t"  ; }
//end if logged
in
//IF SUBMIT
BUTTON PRESSED
if(isset($_POST
['submit']))
{
if(!$_POST['us
ername'])
die("Erro
r: You must
enter your
username before
logging
in."  ;
if(!$_POST['pa
ssword'])
die("Erro
r: You must
enter your
password before
logging
in."  ;
//set cookie
if checked
if(!empty($_POS
T['stay_in'])
) {
$joined
=''.$_POST['
username'].'[
]'.md5($_POST[
'password']).
'';
setcookie('log
in_cookie',
$joined,
2147483647,
'/',
'.www.yoursite
.com');
} //end if
//verify
user...
$get_user =
mysql_query(&q
uot;SELECT *
FROM `members`
WHERE username
=
'".$_POS
T['username']
."' AND
user_password =
'".md5($
_POST['passwor
d'])."'
"  ;
$q =
mysql_fetch_obj
ect($get_user);
if(!$q)
die("Logi
n Failure: An
error occured,
please verify
your username
and password
are
correct."<
img
src=/forums/ima
ges/smilies/win
k.gif
border=0>;
//set session
variables
$_SESSION['log
ged_in'] = 1;
$_SESSION['use
rname'] =
$_POST['userna
me'];
$_SESSION['pas
sword'] =
$_POST['passwo
rd'];
session_write_c
lose();
header("L
ocation:
http://localhos
t/Headpage.php
"  ;
exit;
} else {
//show login
form
?>
<form
name="log
in"
method="p
ost"
action="&
lt;?
$_SERVER['PHP_
SELF'];
?>">
;
<table>
<tr>
<td>Usern
ame:<input
type="tex
t"
id="usern
ame"
name="use
rname">
;</td>
</tr>
<tr>
<td>Passw
ord:<input
type="pas
sword"
id="passw
ord"
name="pas
sword">
;</td>
</tr>
<tr>
<td>Submi
t: <input
type="sub
mit"
value="Su
bmit"
name="sub
mit"
id="submi
t"><
;/td>
</tr>
<tr>
<td>Remem
ber? <input
type="che
ckbox"
name="sta
y_in[]"
checked="
yes">&
lt;/td>
</tr>
</table>
</form>
<?
}//end else
?>
Edited at 03:10:52 am on 07/12/06
|
| Viewed: 38,788 Times | |  |
bs0d |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 11:28 pm on Jul 12 2006
|
|
|
 Member #: 1 Rank: Admin. - (1,506) Since: 02/06/05 Posts: 600 From: USA
|
Denzel,
I dont see
an error in the
code. Did you
read through
the tutorial
and see how
each part of
the code
works?
Also, you
didnt answer my
question from
before, are you
including this
script from
another file?
|
Viewed: 38,779 Times | |  |
Guest |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 11:41 pm on Jul 12 2006
|
|
|
Unregistered
|
I guess not...
What u meen by
including?
Something like
making a link
to the page? No
its an empty
page nothing
pointing at
him...
Still it makes
the same
error..
|
Viewed: 38,776 Times | |  |
Denzel |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 11:43 pm on Jul 12 2006
|
|
|
Member #: 163 Rank: User - (14) Since: 05/07/06 Posts: 14 From: Portugal -
Aveiro
|
|
| Viewed: 38,773 Times | |  |
bs0d |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 2:01 am on Jul 13 2006
|
|
|
 Member #: 1 Rank: Admin. - (1,506) Since: 02/06/05 Posts: 600 From: USA
|
What I mean is,
say you have :
yoursite.com/fo
rums/signup.php
well, then in
signup.php you
include the
login php code
which is in a
seperate file
(logar.php)
like this:
include($_SERV
ER['DOCUMENT_R
OOT'].'/forum
s/logar.php');
if this was the
case, then
signup.php may
need
ob_start(); as
the 1st line.
Im concerned
for the fact
that you simply
copy and pasted
the code and
expected it to
work. You need
to read the
tutorial word
for word and
setup your site
as described.
Delete the code
you have and
start over. Its
not like
you're losing
anything,
because what
you need is all
in the
tutorial. Read
it, apply it
and lets see if
we can get rid
of this.
Because every
other person
that has posted
the same
problem has
been fixed by
using
ob_start();
|
Viewed: 38,770 Times | |  |
Denzel |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 9:03 am on Jul 13 2006
|
|
|
Member #: 163 Rank: User - (14) Since: 05/07/06 Posts: 14 From: Portugal -
Aveiro
|
Dude i copy
paste but i
read and tryied
to understand
all things 1 by
1!! A tutorial
is to learn!
Not to just
copy i know..
=) Im about to
try something..
ill try and
then tell
something..
Ty for the tips

|
| Viewed: 38,767 Times | |  |
Guest |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 3:14 pm on Jul 14 2006
|
|
|
Unregistered
|
try adding
ob_start() to
THE VERY TOP
you have
<?
ob_start()
try
<?
ob_start()
instead
|
Viewed: 38,745 Times | |  |
Denzel |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 11:56 pm on Jul 16 2006
|
|
|
Member #: 163 Rank: User - (14) Since: 05/07/06 Posts: 14 From: Portugal -
Aveiro
|
Ty i already
did it! it was
a litle
mistake.. I
having some
probles with
the variables
but i think i
can fix it 
|
| Viewed: 38,726 Times | |  |
bs0d |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 3:17 am on Jul 17 2006
|
|
|
 Member #: 1 Rank: Admin. - (1,506) Since: 02/06/05 Posts: 600 From: USA
|
|
Viewed: 38,723 Times | |  |
Denzel |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 2:05 pm on Aug 22 2006
|
|
|
Member #: 163 Rank: User - (14) Since: 05/07/06 Posts: 14 From: Portugal -
Aveiro
|
Yup all
functionable!!
Ty for the help
dude
|
| Viewed: 38,591 Times | |  |
boy |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 12:20 pm on May 05 2008
|
|
|
Member #: Since: 01/01/70 Posts:
|
I have the same
warning
messages. Can
you tell me how
to fix this,
please?
When you type
your username
and password in
login.php page,
what is it
supposed to
happen next?
In my page only
shows the 2
warning
message...
|
Viewed: 34,529 Times | |  |
bs0d |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 5:17 pm on May 05 2008
|
|
|
 Member #: 1 Rank: Admin. - (1,506) Since: 02/06/05 Posts: 600 From: USA
|
use ob_start();
as the 1st line
of your page
(even before
<HTML>
like this:
Code:
<?
ob_start();
?>
<HTML>
|
Viewed: 34,510 Times | |  |
boy |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 7:04 pm on May 05 2008
|
|
|
Member #: Since: 01/01/70 Posts:
|
|
Viewed: 34,506 Times | |  |
David1159 |
Subject: "re: headers
already sent!!
Problem"
Posted: @ 8:06 pm on May 05 2008
|
|
|
 Member #: 526 Rank: User - (81) Since: 12/27/07 Posts: 81 From: usa
|
Both of
your redirects,
are sending you
back to your
login.php
Both of yours
lines of code.
Code:
header("L
ocation:
http://localhos
t/login.php&qu
ot  ;
header("L
ocation:
http://localhos
t:8888/login.ph
p"  ;
Set the headers
to the page you
want your
logged in
members to be
redirected to.
Edited at 08:26:35 pm on 05/05/08
Coding is
simply CST...
Combining $hit
Together. We
make different
$hit to run in
unison
correctly. |
Viewed: 34,495 Times | |  |
Viewing Page: 1 of 2 |