wt is wrong here ??
it usually gives me this error :

Parse error: syntax error, unexpected $end in /home/a2354076/public_html/cats/programming/includes/topics.php on line 34


here is the code :

<!-- header ends -->
<!-- content begins -->
<div id="main">
	<div id="right">
       
	
		<a href="http://www.000webhost.com/" onClick="this.href='http://www.000webhost.com/326472.html'" target="_blank"><img src="http://www.000webhost.com/images/banners/468x60/banner13.gif" alt="Free Website Hosting" width="468" height="60" border="0" /></a>
           <?php
		   $mysql_host = "mysql9.000webhost.com";
$mysql_database = "a2354076_test";
$mysql_user = "a3344545_awah";
$mysql_password = "password";
if(isset($_GET['lang']))
{
if(isset($_GET['id']))
{
$lang = $_GET['lang'];
$id = $_GET['id'];

		   mysql_connect('mysql9.000webhost.com','a2354076_awah','the eagle of 2010') or die("cant connect to the server");
		   mysql_select_db($mysql_database) or die("cant selct hte database ");
		   $sql = mysql_query("SELECT * FROM $lang where id = '$id'");
		   while($rows = mysql_fetch_array($sql))
		   {
		   echo "<h4> ".$rows['title']."</h4>";
		   echo "<p>".$rows['post']."</p>";
		   }mysql_close();
		   ?>
			<a href="http://www.000webhost.com/" onClick="this.href='http://www.000webhost.com/326472.html'" target="_blank"><img src="http://www.000webhost.com/images/banners/468x60/banner13.gif" alt="Free Website Hosting" width="468" height="60" border="0" /></a>
          
            </p>
			
  <br />
</div>

Recommended Answers

All 3 Replies

#
if(isset($_GET['lang']))
#
{
#
if(isset($_GET['id']))
#
{

you have to close the parentheses..

Hi,

I think you forget to close the curly braces of two opened if loops.

<!-- header ends -->
<!-- content begins -->
<div id="main">
	<div id="right">
       
	
		<a href="http://www.000webhost.com/" onClick="this.href='http://www.000webhost.com/326472.html'" target="_blank"><img src="http://www.000webhost.com/images/banners/468x60/banner13.gif" alt="Free Website Hosting" width="468" height="60" border="0" /></a>
           <?php
		   $mysql_host = "mysql9.000webhost.com";
$mysql_database = "a2354076_test";
$mysql_user = "a3344545_awah";
$mysql_password = "password";
if(isset($_GET['lang']))
{
if(isset($_GET['id']))
{
$lang = $_GET['lang'];
$id = $_GET['id'];

		   mysql_connect('mysql9.000webhost.com','a2354076_awah','the eagle of 2010') or die("cant connect to the server");
		   mysql_select_db($mysql_database) or die("cant selct hte database ");
		   $sql = mysql_query("SELECT * FROM $lang where id = '$id'");
		   while($rows = mysql_fetch_array($sql))
		   {
		   echo "<h4> ".$rows['title']."</h4>";
		   echo "<p>".$rows['post']."</p>";
		   }mysql_close();
}
}
		   ?>
			<a href="http://www.000webhost.com/" onClick="this.href='http://www.000webhost.com/326472.html'" target="_blank"><img src="http://www.000webhost.com/images/banners/468x60/banner13.gif" alt="Free Website Hosting" width="468" height="60" border="0" /></a>
          
            </p>
			
  <br />
</div>
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.