Ok I have written a script and I need some help with it the script is:
I'm a complete noob at this but when I run the script I get this error:
Could someone please tell me what I'm doing wrong.
PHP:
<?php
include ("sql.php");
$result = mysql_query("SELECT articleid, title FROM article") or
die (mysql_error());
while ($row = mysql_fetch_array($result))
{
echo "<a href=\"http://www.surrix.net/db/read.php?id=$row["articleid"]\">$row["title"]</a>";
echo "
\n";
}
mysql_free_result($result);
?>
I'm a complete noob at this but when I run the script I get this error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/surrix/public_html/db/latest.php on line 9
Could someone please tell me what I'm doing wrong.