Results 1 to 3 of 3

Thread: sorry me again

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2004
    Posts
    1,202

    sorry me again

    Hello,

    i'm having a problem my footer is out of place can you help me solve this please this is the code below.?

    PHP Code:
    <?php 
    include 'core/init.php';
    protect_page();
    include 
    'includes/overall/header.php'
    ?>
            
            <h1>View Topic Page</h1>
            <p>Info Goes Here.</p>
        
            <div id="wrapper">
            
            <?php

            
    // Assign local variables from the variables in the URL
            
    $cid $_GET['cid'];
            
    $tid $_GET['tid'];
            
    // Select the topic data depending on the $cid and $tid variables
            
    $sql "SELECT * FROM topics WHERE category_id='".$cid."' AND id='".$tid."' LIMIT 1";
            
    // Execute the SELECT query
            
    $res mysql_query($sql) or die(mysql_error());
            
    // Check to see if the topic exists
            
    if (mysql_num_rows($res) == 1) {
                echo 
    "<table width='100%'>";
                
    // Check to see if the person accessing this page is logged in
                
    if ($_SESSION['user_id']) { echo "<tr><td colspan='2'><input type='submit' value='Add Reply' onClick=\"window.location = 'post_reply.php?cid=".$cid."&tid=".$tid."'\" /><hr />"; } else { echo "<tr><td colspan='2'><p>Please log in to add your reply.</p><hr /></td></tr>"; }
                
    // Fetch all the topic data from the database
                
    while ($row mysql_fetch_assoc($res)) {
                    
    // Query the posts table for all posts in the specified topic
                    
    $sql2 "SELECT * FROM posts WHERE category_id='".$cid."' AND topic_id='".$tid."'";
                    
    // Execute the SELECT query
                    
    $res2 mysql_query($sql2) or die(mysql_error());
                    
    // Fetch all the post data from the database
                    
    while ($row2 mysql_fetch_assoc($res2)) {
                        
    // Echo out the topic post data from the database
                        
    echo "<tr><td valign='top' style='border: 1px solid #000000;'><div style='min-height: 100px;'>".$row['topic_title']."<br />by ".$row2['post_creator']." - ".$row2['post_date']."<hr />".$row2['post_content']."</div></td><td width='200' valign='top' align='center' style='border: 1px solid #000000;'>User Info Here</td></tr><tr><td colspan='2'><hr /></td></tr>";
                    }
                
                }
            } else {
                
    // If the topic does not exist
                
    echo "<p>This topic does not exist.</p>";
            }
            
    ?>
            
            </div>
        
     
    <?php include 'includes/overall/footer.php'?>
    Name:  error.jpg
Views: 186
Size:  16.5 KB
    Last edited by Jamie_Garland; Aug 5th, 2014 at 06:14 PM.
    come back and mark your original post as resoved if your problem is fixed

    Jamie Garland

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: sorry me again

    It would be better for you to post the resulting HTML for us to see (including the header and footer includes), but right off the bat, my guess would be that you're missing your closing table tag.

  3. #3
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: sorry me again

    Also, please only post the code relevant to the question you are asking! The type of question you have asked is about the layout of the site which, is a HTML, CSS issue rather than a PHP issue. PHP is used for stuff such as information processing. It is also bad practice to intertwine html and php as you have done... they should be kept separate.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width