0

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 :)

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by samsons17
0

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

0

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

0

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.

Edited by diafol: n/a

0

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 :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.