Ok I try to call a mysql in a php script but i always get this error:
Parse error: parse error, unexpected $ in /home/thedigi/public_html/dark/darknews/news.php on line 145
But all there is on line 145 is </body>
heres the code:
<head>
<title>DSNews Control Panel</title>
</head>
<body bgcolor=#042E3E>
<?
include ('config.php');
mysql_pconnect($localhost,$username,$password);
mysql_select_db($database);
if(!$x) $x=0;
$result2 = mysql_query("select from news order by id");
$result = mysql_query("select from news order by id limit $x,$limit");
while($r=mysql_fetch_array($result))
{ $title=$r["title"];
$message=$r["message"];
$who=$r["who"];
$date=$r["date"];
$time=$r["time"];
$lower = strtolower($who);
?>
<center>
<table border=1 width=80% cellspacing=0 cellpadding=0 bordercolor=#0B1F28>
<tr>
<td width=100% bgcolor=#003F51 bordercolor=#003F51>
<p align=center><font face=Tahoma size=2 color=#FFFFFF><b><img border=0 src=../../../Dark%20Element/DEN%20PHP/next_sm.gif width=6 height=10>
Welcome to the $user News Section!</b></font></td>
</tr>
</table>
</center>
</div>
<div align=center>
<center>
<table cellSpacing=0 cellPadding=0 bgColor=#004080 border=1 bordercolorlight=#021A22 bordercolordark=#064F6A>
<tbody>
<tr>
<td bgcolor=#042E3E>
<table cellSpacing=1 cellPadding=2 width=600 border=1 bordercolor=#042E3E bgcolor=#042E3E height=207>
<tbody>
<tr>
<td bgcolor=#042E3E bordercolor=#042E3E colspan=2 width=588 height=19><font face=Arial color=#ffffff><strong>$sectioname</strong></font></td>
</tr>
<tr>
<td bgColor=#021A22 bordercolor=#000000 width=106 height=172 valign=top>
<table border=0 width=100% cellspacing=1>
<tr>
<td width=100% bgcolor=#062531><font face=Tahoma size=2 color=#0099C6><a href=news.php?action=main> Main
Page</a></font>
</td>
</tr>
<tr>
<td width=100% bgcolor=#062531><font face=Tahoma size=2 color=#0099C6> <a href=news.php?action=settings>Settings</a></font>
</td>
</tr>
<tr>
<td width=100% bgcolor=#062531><font face=Tahoma size=2 color=#0099C6> User
Info</font></td>
</tr>
<tr>
<td width=100% bgcolor=#062531><font face=Tahoma size=2 color=#0099C6> Submit News</font>
</td>
</tr>
<tr>
<td width=100% bgcolor=#062531><font face=Tahoma size=2 color=#0099C6> Modify
News</font>
</td>
</tr>
</table><font face=Arial size=1 color=#0099C6> Help</font>
</td>
<td bgColor=#021A22 bordercolor=#000000 width=474 height=172 valign=top>
<font size=2 color=#0099C6 face=Tahoma><BR><?
switch ($action) {
///SUB: MAIN PAGE
case main:
print " <table border=0 width=100% bgcolor=#00252F cellspacing=0 cellpadding=0>
<tr>
<td width=100%><b><font color=#0099C6 size=2 face=Tahoma>Welcome
to the Darkelement News Section, $username!</font></b></td>
</tr>
</table><font size=2 color=#0099C6 face=Tahoma> Choose one
of the following pages:<BR> </font>
<table border=0 width=100% cellspacing=0 cellpadding=0 height=207>
<tr>
<td width=100% bgcolor=#002830 height=21><font face=Tahoma> <b><font size=2 color=#0099C6>Main
Page</font></b></font></td>
</tr>
<tr>
<td width=100% height=21><font face=Verdana> <font size=1 color=#0099C6>You
are already here. This is where you choose which section
to go to..</font></font></td>
</tr>
<tr>
<td width=100% bgcolor=#002830 height=21> <b><font size=2 color=#0099C6 face=Tahoma>Settings</font></b></td>
</tr>
<tr>
<td width=100% height=21> <font size=1 color=#0099C6 face=Verdana>This
is where you edit the settings for DSNews [Design colors, full
paths, etc.]</font></td>
</tr>
<tr>
<td width=100% bgcolor=#002830 height=18><font color=#0099C6 face=Tahoma size=2><b> User
Info</b></font></td>
</tr>
<tr>
<td width=100% height=21> <font size=1 color=#0099C6 face=Verdana>Add/Delete
a user for DSNews, or edit your own information. </font></td>
</tr>
<tr>
<td width=100% bgcolor=#002830 height=21> <font face=Tahoma size=2 color=#0099C6><b>Submit
News</b></font></td>
</tr>
<tr>
<td width=100% height=21> <font size=1 color=#0099C6>Add
a news update to your website, or wherever you display your
news. </font></td>
</tr>
<tr>
<td width=100% bgcolor=#002830 height=21> <b><font face=Tahoma size=2 color=#0099C6>Modify
News</font></b></td>
</tr>
<tr>
<td width=100% height=21><font face=Tahoma size=1 color=#0099C6>
</font><font size=1 color=#0099C6 face=Verdana>Edit
current news on your website.</font></td>
</tr>
</table>";
break;
case settings:
print "<form method=POST action=news.php>
<input type=text name=username>
<input type=submit value=update>
</form>";
break;
case 3:
print "i equals 2";
break;
}
?>
</font>
</td>
</tr>
</tbody>
</table>
</center>
</body>