mike12255 Posted January 19, 2009 Share Posted January 19, 2009 Because my CSS i cannot change do something like header ("Location: index.php"); when i try it, i get this error: Warning: Cannot modify header information - headers already sent by (output started at /home/sgiclan/public_html/testforum/reply.php:5) in /home/sgiclan/public_html/testforum/reply.php on line 66 here is my css: <!--- body { a:link, a:visited, a:active { text-decoration: none} font-family:Verdana, Sans-serif; color; #000000; font-size: 12px } input,textarea, select,{ color : #000000; font: normal 12px; border-collapse: collapse; border: 1px solid #000000; } .maintable {border: 0px ; width: 100%; padding: 0px; background-color: #FFFFFF} /*main table for forum*/ .regrow {font-family: Verdana,Sans-serif; color: #000000; font-weight: bold; background-color: #FFFFFF;font-size: 12px;} /*registration row, mainly here for symetry*/ .headline {font-family: Verdana,Sans-serif;font-weight: bold;color: #FFFFFF;background-color: #003366;font-size: 11px;} /*headline row, the first row that says forum name, topics, posts and such*/ .forumrow {font-family: Verdana,Sans-serif; color: #000000;background-color: #F2F2F2;font-size: 12px;} /*color of the forum rows*/ .mainrow a:link, a:visited, a:active { text-decoration: none;} .mainrow {font-family: Verdana,Sans-serif; color: #000000;background-color: #F2F2F2;font-size: 12px; a:link, a:visited, a:active { text-decoration: none}} /*color of the forum rows*/ .maintables{background-color: #FFFFFF; width: 85%; padding: 0px; border: 3px solid; cellspacing: no} /*main table for forum*/ ---> This is seriously limitting me does anyone know how to fix this? Link to comment https://forums.phpfreaks.com/topic/141407-solved-my-css-limits-me/ Share on other sites More sharing options...
Lodius2000 Posted January 19, 2009 Share Posted January 19, 2009 where is the header call in your php document Link to comment https://forums.phpfreaks.com/topic/141407-solved-my-css-limits-me/#findComment-740220 Share on other sites More sharing options...
DarkSuperHero Posted January 19, 2009 Share Posted January 19, 2009 http://www.phpfreaks.com/forums/index.php/topic,37442.0.html <--read this... how does your css tie in with your php ? in the code provided neither ties in to each other... please be more specific on how they interact... Link to comment https://forums.phpfreaks.com/topic/141407-solved-my-css-limits-me/#findComment-740221 Share on other sites More sharing options...
mike12255 Posted January 19, 2009 Author Share Posted January 19, 2009 well i start my php file like this: <?php include "connect.php"; //connection string include("include/session.php"); print "<link rel='stylesheet' href='style.css' type='text/css'>"; print "<table class='maintables'>"; print "<tr class='headline'><td>Reply</td></tr>"; print "<tr class='maintables'><td>"; and if my first if statment returns false it gose to: }else{ header ("Location: index.php"); } is that being specific enough or do you guys need more? Link to comment https://forums.phpfreaks.com/topic/141407-solved-my-css-limits-me/#findComment-740223 Share on other sites More sharing options...
Lodius2000 Posted January 19, 2009 Share Posted January 19, 2009 i still dont see the header call in there mike but regardless I assume you want the print "<A href='index.php'>Click here</a> "; to be the header call in which case it cant because headers have already been sent in the first thing that outputs to the browser ie your first print command: print "<link rel='stylesheet' href='style.css' type='text/css'>"; EDIT: what does this page do, then I might be able to help more Link to comment https://forums.phpfreaks.com/topic/141407-solved-my-css-limits-me/#findComment-740224 Share on other sites More sharing options...
mike12255 Posted January 19, 2009 Author Share Posted January 19, 2009 or sorry that was my temp fix i copy and pasted. Here is the header: }else{ header ("Location: index.php"); } this page displays a forum for users to enter a reply to a post however is the topic is locked and they are not an admin and try entering something like http://***-***.info/testforum/message.php?id=23 i want them to get redirected to the main forum page Link to comment https://forums.phpfreaks.com/topic/141407-solved-my-css-limits-me/#findComment-740226 Share on other sites More sharing options...
Lodius2000 Posted January 19, 2009 Share Posted January 19, 2009 ok.... all of the prints need to be inside your if() that way if the if() is false then the header is the only thing sent to the browser, if it is true then the prints get sent Link to comment https://forums.phpfreaks.com/topic/141407-solved-my-css-limits-me/#findComment-740227 Share on other sites More sharing options...
mike12255 Posted January 19, 2009 Author Share Posted January 19, 2009 oh ok, i get it now. So a header cannot overwrite a header kinda thing. Anyway got it working thanks again for the help mate. Link to comment https://forums.phpfreaks.com/topic/141407-solved-my-css-limits-me/#findComment-740228 Share on other sites More sharing options...
Lodius2000 Posted January 19, 2009 Share Posted January 19, 2009 please click solved... o you did, sorry Link to comment https://forums.phpfreaks.com/topic/141407-solved-my-css-limits-me/#findComment-740230 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.