Hello folks,
Need some help on this one ,
I am trying to make a shout box for my site and found this code ,
But i get the following errors : Parse error: syntax error, unexpected T_STRING in /home/a3785887/public_html/comment.php on line 6
Do you think you could give me a hand some one ,
code is
<?php
//Edit only the line below
$dbcnx = mysql_connect("servername","dbname","username","password")
mysql_select_db("comments");
$result = @mysql_query("SELECT * FROM comtbl ORDER BY postID DESC");
if (!$result) {
echo("<b>Error performing query: " . mysql_error() . "</b>");
exit();
}
while ($row = mysql_fetch_array($result) ) {
$msgTxt = $row["postTXT"];
$msgId = $row["postID"];
$SigName = $row["posterNAME"];
$SigDate = $row["postTIME"];
$msgTitle = $row["postTITLE"];
$url = $row["posterEMAIL"];
$yr = substr($SigDate, 2, 2);
$mo = substr($SigDate, 4, 2);
$da = substr($SigDate, 6, 2);
$hr = substr($SigDate, 8, 2);
$min = substr($SigDate, 10, 2);
if ($hr > "11") {
$x = "12";
$timetype = "PM";
$hr = $hr - 12;
}else{
$timetype = "AM";
}
if (!$url) {
$url = "#";
}else{
$stat = $url;
$url = "mailto:" . $url . "";
}
echo("<p><b>$msgTitle</b> $msgTxt<br><div align=right>
$hr:$min $timetype | $mo/$da/$yr | $msgId, <a href='$url'>$SigName</a></div></p>");
}
?>
Many thanks