Hi, after days of figuring this out, i still have no idea of whats wrong with the code..
Hopefully you guys could help me out..

when i put this code on my home.php file, i keep getting this error :

Parse error: syntax error, unexpected $end in C:\xampp\htdocs\smartforum\home.php on line 348

this is the code that i meant :

<ul id="wall">
          <?php
           include('insert.php');
           $test=mysql_query("SELECT*FROM wall ORDER BY id DESC");
                	
              while($row=mysql_fetch_array($test)){
                echo "<li class='stbody'><div class='stimg'></div><div class='sttext'>".
                      $row["message"].
                      
                     "<div class='below'><div class='sttime'>2 seconds ago</div>
		      <div class='help-toggle'>| Help |</div>
		      <div class='trigger_default'><a href='#'>Discuss</a></div>
		      <div class='toggle_container_default'>
       
	              <ul class='reply_text'>
                         <!--This is where i try to execute the second query
                          where the comment for each wall post appear--> ";
                         ?> <?php include(get_reply.php); ?><?
                echo "      </ul>
		       
   <div class='block'>
      <form name='disscuss_text' id='post_reply' id='post_reply'>
        <textarea rows='3' cols='87' id='discuss_text' name='discuss_text'></textarea>
        <input type='submit' value='Post' name='Help' id='post-button' />
      </form>
   </div>
		</div>
	        </div>	
	        </li>";
		
                }
                ?>
            </ul>

help me please...

Thank You :)

The problem is with ur included pages.
It the missing of closing braces on functions or loops.
Checkout the included pages.

The problem is with ur included pages.
It the missing of closing braces on functions or loops.
Checkout the included pages.

hi there,thanks for answering,
and here the included pages code:

<?php
include("config.php");
$test3=mysql_query("SELECT*FROM reply");

while($row3=mysql_fetch_array($test3)){
	echo $row3['message'].'<br/>';
}

?>

and here is the config.php file:

<?php
// Change this parameter with your connection's info.
$db_host="localhost";
$db_name="******";
$username="*****";
$password="*****";
$db_con=mysql_connect($db_host,$username,$password);
$connection_string=mysql_select_db($db_name);
// Connection
mysql_connect($db_host,$username,$password);
mysql_select_db($db_name);
?>

i do not see anything wrong here with my codes,,please tell me if you see something..
thank you...

Member Avatar for diafol

You've included a lot of html within the php tags. How about...

<ul id="wall">
                     <?php
                     include('insert.php');
                     $test=mysql_query("SELECT*FROM wall ORDER BY id DESC");
                     while($row=mysql_fetch_array($test)){
                     ?>     
                     <li class='stbody'>
                        <div class='stimg'>
                        </div>
                        <div class='sttext'>
                           <?php echo $row["message"];?>
                           <div class='below'>
                               <div class='sttime'>
                                   2 seconds ago
                               </div>
		               <div class='help-toggle'>
                                   | Help |
                               </div>
		               <div class='trigger_default'>
                                   <a href='#'>Discuss</a>
                               </div>
		               <div class='toggle_container_default'>
                                  <ul class='reply_text'>
                                      <?php include('get_reply.php');?>
                                  </ul>
                               <div class='block'>
                                  <form name='disscuss_text' id='post_reply' id='post_reply'>
                                     <textarea rows='3' cols='87' id='discuss_text' name='discuss_text'></textarea>
                                     <input type='submit' value='Post' name='Help' id='post-button' />
                                  </form>
                               </div>
		           </div>
	               </div>	
	           </li>
                   <?php 
                   }
                   ?>
               </ul>

Can't see any unclosed braces. Check your include files for unclosed braces.

You've included a lot of html within the php tags. How about...

<ul id="wall">
                     <?php
                     include('insert.php');
                     $test=mysql_query("SELECT*FROM wall ORDER BY id DESC");
                     while($row=mysql_fetch_array($test)){
                     ?>     
                     <li class='stbody'>
                        <div class='stimg'>
                        </div>
                        <div class='sttext'>
                           <?php echo $row["message"];?>
                           <div class='below'>
                               <div class='sttime'>
                                   2 seconds ago
                               </div>
		               <div class='help-toggle'>
                                   | Help |
                               </div>
		               <div class='trigger_default'>
                                   <a href='#'>Discuss</a>
                               </div>
		               <div class='toggle_container_default'>
                                  <ul class='reply_text'>
                                      <?php include('get_reply.php');?>
                                  </ul>
                               <div class='block'>
                                  <form name='disscuss_text' id='post_reply' id='post_reply'>
                                     <textarea rows='3' cols='87' id='discuss_text' name='discuss_text'></textarea>
                                     <input type='submit' value='Post' name='Help' id='post-button' />
                                  </form>
                               </div>
		           </div>
	               </div>	
	           </li>
                   <?php 
                   }
                   ?>
               </ul>

Can't see any unclosed braces. Check your include files for unclosed braces.

OMG!!! You are my saviour man! Now only i know the correct way to insert the HTML code into the PHP..Now my problem is finally solved..

Thank You very much :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.