Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: Reply box

  1. #1
    Banned
    Join Date
    Feb 2008
    Location
    USA
    Posts
    61
    Thanks
    15
    Thanked 1 Time in 1 Post

    Reply box

    Hey I don't know how to get this reply thing to work. It sopposed to select from the database and get that reply from that topic.

    Here what I have.

    PHP Code:
    <?php require_once("config.php"); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
        color: #000000;
    }
    .style1 {
        color: #66CCFF
    }
    -->
    </style></head>


    <body> <?php include ("menu.php"); ?>
    <table width="1018" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="801" height="117" valign="top">
    <?php require_once("config.php"); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
        color: #000000;
    }
    .style1 {
        color: #66CCFF
    }
    -->
    </style>
    <body>
    <table width="1018" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="801" height="117" valign="top">
     <?PHP $id = (isset($_GET['id'])) ? intval($_GET['id']) : 1?>
        <?php $result mysql_query("SELECT * FROM natopics WHERE id='$id'") or die(mysql_error());  // get the first (and hopefully only) entry from the result

    echo "<td></td>";
    while(
    $row mysql_fetch_array$result )){
    echo 
    "<td></td>";
    echo 
    $row['message'];
    }
    echo 
    "</table>"
    ?>   &nbsp;</td>
        <td width="217">&nbsp;</td>
      </tr>
      <tr>
        <td height="96" valign="top"> <?PHP $id = (isset($_GET['id'])) ? intval($_GET['id']) : 1?><?php $result mysql_query("SELECT * FROM reply WHERE id='$id'") or die(mysql_error());  // get the first (and hopefully only) entry from the result<!--DWLayoutEmptyCell-->&nbsp;</td> ?>
      <?php  echo "<td></td>";
    while(
    $row mysql_fetch_array$result )){
    echo 
    "<td></td>";
    echo 
    $row['reply'];
    }
    echo 
    "</table>"
    ?>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="117">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>  <!--DWLayoutEmptyCell-->&nbsp;</td>
        <td width="217">&nbsp;</td>
      </tr>
      <tr>
        <td height="213">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>
    Please help me!!

  • #2
    Banned
    Join Date
    Feb 2008
    Location
    USA
    Posts
    61
    Thanks
    15
    Thanked 1 Time in 1 Post
    Please

  • #3
    Banned
    Join Date
    Feb 2008
    Location
    USA
    Posts
    61
    Thanks
    15
    Thanked 1 Time in 1 Post
    Please help mee!!!

  • #4
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    What are you asking for?
    BTW, you have duplicate code from your DOCTYPE to <!--DWLayoutTable-->.

  • #5
    Senior Coder
    Join Date
    Apr 2007
    Location
    Quakertown PA USA
    Posts
    1,028
    Thanks
    1
    Thanked 125 Times in 123 Posts
    And this is certainly not correct, not entirely sure what you're trying to accomplish here.
    Code:
       <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="117">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>  <!--DWLayoutEmptyCell-->&nbsp;</td>
        <td width="217">&nbsp;</td>
      </tr>
      <tr>
        <td height="213">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>
    John

  • #6
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    why the double require_once(config.php);?

  • #7
    Banned
    Join Date
    Feb 2008
    Location
    USA
    Posts
    61
    Thanks
    15
    Thanked 1 Time in 1 Post
    I don't know.

    Ok what I'm trying to do is make it where when you create a reply you can se your reply.
    Right now it will show you the topic only without the reply you made.

    So if you click a topic it will bring you to that topic and you will be able to see what's in the topic but it won't show your reply you made.


  •  

    Posting Permissions

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