Jump to content

mike12255

Members
  • Posts

    439
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by mike12255

  1. 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?

  2. 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?

  3. 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 1

     

    idk i cant see anything wrong, but then again im really tired. Thanks for the help :D

  4. 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.