mike12255
-
Posts
439 -
Joined
-
Last visited
-
Days Won
1
Posts posted by mike12255
-
-
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
-
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?
-
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 66here 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?
-
strange the query worked without those in another php file of mine :S anyway thanks for the help mates.
-
Thanks mate that worked! but before i hit topic solved mabey somone can answer one more question i have. What do the "`" is the following code mean/stand for/do?
SELECT `locked` FROM `forumtutorial_posts` WHERE `postid` = '{$id}'"
-
getting the same error still
-
you should click on the "Topic Solved" button at the bottom of the page mate, this way people wont look at this anymore since there isnt much need.
-
I have the following code:
$id=$_GET['id']; $query = "SELECT locked FROM forumtutorial_posts WHERE postid = $id"; $result = mysql_query($query) or die(mysql_error()); $record = mysql_fetch_assoc($result); if ($record['locked'] < 1 ){ if(isset($_POST['submit']))
and when i run it on my server i get the error :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1idk i cant see anything wrong, but then again im really tired. Thanks for the help
-
Thought it was only one, thanks mates
-
Is the following line suposed to have two ";"?
$result = mysql_query($query) or die(mysql_error());;
I tried it with both there and with only one and got the following error displayed on my page.
-
I got the current code:
if($session->isAdmin()){ print"  -<A href='deletetopic.php?id=$id'>Delete Topic "; $query = "SELECT locked FROM forumtutorial_posts WERE postid = $id"; $result = mysql_query($query); print $result; if ($result < 1){// if locked is set to 0 (unlocked) print"  -<A href='locktopic.php?id=$id'>Lock Topic"; }else{//otherwise show unlock print"  -<A href='unlocktopic.php?id=$id'>Unlock Topic"; } }
I know that locked for the postid it should be using (13) is set to 1 so it should show unlock topic, but instead it shows lock topic. Can anyone see why?
[SOLVED] My CSS limits me
in PHP Coding Help
Posted
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.