0

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>

Edited by Awah Mohamed: n/a

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Awah Mohamed
1
#
if(isset($_GET['lang']))
#
{
#
if(isset($_GET['id']))
#
{

you have to close the parentheses..

1

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>
This topic has been dead for over six months. 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.