Image

Imagepucker wrote in Imagephp 😯confused

posting for a friend

I'm trying to make something on my site that displays login boxes when the
user isn't logged in which will say 'welcome, guest' in the top bar if they
aren't logged in or cookied. Or if they're logged in/cookied then it'll say
Welcome, $username and the login boxes will disappear. I've tried getting help
over at vb.org quite a few times but it's like pulling teeth and no one knows or
no one is responding.


This is what I have now: </p>

PHP:





<?

require("/home/dumbfoun/public_html/board/global.php");


echo
"<font color=\"#FFFFFF\" face=\"Tahoma\"
size=\"2\">\n"
;

if(
$bbuserinfo['userid']!=0)
{

$username =
$bbuserinfo['username'];


$ided =1;


echo
"Welcome, $username";


}

else {

echo
"Welcome, Guest";


}



echo
"</td><td width=50% align=right>";


echo
"<p align=right><font color=\"#FFFFFF\"
face=\"Tahoma\" size=\"2\">\n"
;

echo
"<nobr>";

echo
date("l,
M d Y"
);

echo
"</nobr>";

?>





and



PHP:





<?

if(!$ided)
{

echo
"<p align=\"right\">";


echo
"<table border=\"0\" cellpadding=\"0\"
cellspacing=\"0\">"
;

echo
"<form action=\"/board/admin/member.php\"
method=\"post\">"
;

echo
"<tr>";

echo
"<td nowrap><font face=\"verdana,arial,helvetica\"
size=\"1\" color=\"white\"><b>Not cookied?</b><br>Login with username and
password:</font>"
;

echo
"</td>";

echo
"</tr><tr>";


echo
"<td nowrap><input type=\"hidden\"
name=\"s\" value=\"769c1aabe4f6207720ccfac822020d95\">"
;


echo
"<input type=\"hidden\" name=\"action\"
value=\"login\">"
;

echo
"<input type=\"text\" class=\"bginput\"
name=\"username\" size=\"7\">"
;

echo
"<input type=\"password\" class=\"bginput\"
name=\"password\" size=\"7\">"
;

echo
"<input type=\"submit\" class=\"bginput\"
value=\"Login!\"></td>"
;

echo
"</tr>";

echo
"</form>";

echo
"</table>";

echo
"</p>";



}

?>





I get Warning: Cannot modify header information - headers already sent by
(output started at /home/dumbfoun/public_html/index.php:6) in /home/dumbfoun/public_html/board/admin/functions.php
on line 1652



Can anyone help? :/ - all of that code is imbedded in
my html in my index.php of my main site btw. I wouldn't mind emailing someone my
whole index.php if it'll help figure out the problem but I'm pretty stuck and
running out of people to ask.