require ("$threadspath/main.inc.p..."> require ("$threadspath/main.inc.p...">
 
Previous Thread
Next Thread
Print Thread
Rate Thread
#283115 01/17/2005 11:04 AM
Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
if i do this i get this error

Code
               <?<br /> $threadspath = "/usr/local/www/sites/4701.dk/httpdocs/ubbthreads";<br /> require ("$threadspath/main.inc.php");<br /> <br /><br />  // Send the headers<br />   $html = new html;<br />   $html -> send_header($pagetitle,$Cat,0,$user);	<br /> <br />   <br /> // Get the user info<br />   $userob = new user;<br />   $user = $userob -> authenticate();                         <br />   $Username = $user['U_Username'];<br /><br /> <br />   if (!$user['U_Username']) {<br />      $html -> not_right ($ubbt_lang['NO_AUTH'],$Cat);<br />   }<br /><br />// ----------------------------------------<br />// Get the current profile for this username<br />   $Username_q = addslashes($Username);<br />   $query = "<br />      SELECT U_LoginName,U_Password,U_Email,U_Fakeemail,U_Name,U_Signature,U_Homepage,U_Occupation,U_Hobbies,U_Location,U_Bio,U_TextCols,U_TextRows,U_Extra1,U_Extra2,U_Extra3,U_Extra4,U_Extra5,U_Picture,U_Visible,U_AcceptPriv,U_OnlineFormat,sbdato,konto,alder,hojde,U_Number<br />      FROM  {$config['tbprefix']}Users<br />      WHERE U_Number = '{$user['U_Number']}'<br />   ";<br />   $sth = $dbh -> do_query($query);<br />   // Make sure we found this Username<br />   list($LoginName,$ChosenPassword,$Email,$Fakeemail,$Name,$Signature,$Homepage,$Occupation,$Hobbies,$Location,$Bio,$TextCols,$TextRows,$ICQ,$Extra2,$Extra3,$Extra4,$Extra5,$Picture,$Visible,$AcceptPriv,$OnlineFormat,$sbdato,$konto,$alder,$hojde,$Number) = $dbh -> fetch_array($sth); <br />   $dbh -> finish_sth($sth);<br /><br />   if (!$ChosenPassword){<br />      $html -> not_right("{$ubbt_lang['NO_PROF']} '$Username'",$Cat);<br />   }<br />?> 



the error is

Code
 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/sites/4701.dk/httpdocs/ubbthreads/pigedatas1.php:1) in /usr/local/www/sites/4701.dk/httpdocs/ubbthreads/ubbt.inc.php on line 255<br /><br />Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/sites/4701.dk/httpdocs/ubbthreads/pigedatas1.php:1) in /usr/local/www/sites/4701.dk/httpdocs/ubbthreads/ubbt.inc.php on line 316 


what is wrong ???

thomas

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
Yiz are sending the header
$html -> send_header($pagetitle,$Cat,0,$user);

and then if an error comes,
$html -> not_right ($ubbt_lang['NO_AUTH'],$Cat);

the header is sent again.

You should send the header after all the code before the template is included.

Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
hmmm

i moved the header but i still gets the error ???

http://www.4701.dk/ubbthreads/pigedatas1.phps

whats wrong ???

Thomas

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
$html = new html; has to be at the top, under $Username = $user['U_Username'];

Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
done, but i still get the error

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/sites/4701.dk/httpdocs/ubbthreads/pigedatas1.php:1) in /usr/local/www/sites/4701.dk/httpdocs/ubbthreads/ubbt.inc.php on line 255

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/sites/4701.dk/httpdocs/ubbthreads/pigedatas1.php:1) in /usr/local/www/sites/4701.dk/httpdocs/ubbthreads/ubbt.inc.php on line 316

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,575
Posts293,930
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)