hi guys , i wrote this code but when i try to open the page it says there is a syntax error on line 26
here is the code :
<table width="400" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td>
<strong><h2>Welcome to Our Website</h2></strong>
</td>
</tr>
</table>
<br />
<?
$tbl_name = "posts";
mysql_connect('localhost','username','password')or die("can not connnect to database");
mysql_select_db("$musql_database")or die("sorry , can not sellect db");
$sql="SELECT*FROM $tbl_name";
$result=mysql_query($sql);
while($rows=mysql_fetch_array("$result"))
{
?>
<table width="400" border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
<tr><td>
<table width="400" border="0" cellpadding="2" cellspacing="1" bgcolor="#ffffff">
<tr>
<td>Title : <? echo $rows['title']; ?></td>
</tr>
<tr>
<td>--> <? echo $rows['post']; ?> </td>
</tr>
</table></td></tr></table>
and this is the error :
Parse error: syntax error, unexpected $end in /www/a/w/a/awah/htdocs/add_email_test/admin/view-posts.php on line 26
this code is to get the post and the title form the database and it view it ,like a blog .