Jump to content

mike12255

Members
  • Posts

    439
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by mike12255

  1. 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.
  2. 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
  3. 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?
  4. Because my CSS i cannot change do something like header ("Location: index.php"); when i try it, i get this error: 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?
  5. strange the query worked without those in another php file of mine :S anyway thanks for the help mates.
  6. 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}'"
  7. 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.
  8. 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 : idk i cant see anything wrong, but then again im really tired. Thanks for the help
  9. 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.
  10. I got the current code: if($session->isAdmin()){ print" &nbsp-<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" &nbsp-<A href='locktopic.php?id=$id'>Lock Topic"; }else{//otherwise show unlock print" &nbsp-<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?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.