Hello,
This is the error I'm getting : Parse error: parse error, unexpected $ in link/to/my/file/news.php on line 48
Here is news.php
<?php
//CONNECT TO THE DATABASE
$link=mysql_connect('HOST','LOGIN','PASSWORD')
or die('Could not connect: ' . mysql_error());
mysql_select_db('DATABASE') or die('Could not select database');
//FIRST FOUR NEWS ARTICLES
$result = mysql_query("SELECT * FROM `news` ORDER BY `date` DESC LIMIT 0 , 4");
while ($array = mysql_fetch_array($result)) {
$id = $array['id'];
$date = $array['date'];
$staffid = $array['staffid'];
$story_full = $array['story_full'];
$story_short = $array['story_short'];
$headline = $array['headline'];
//WHOSE CHILD IS THIS?!?!?
$result = mysql_query("SELECT `username`,`avatar` FROM `staff` WHERE `id` = '$staffid'");
while ($array = mysql_fetch_array($result)) {
$username = $array['username'];
$avatar = $array['avatar'];
echo "<tr><td width='100%'><img border='1' src='icons/rides/$avatar.gif' align='left' width='75' height='75'><b><font face='Arial' size='2'>$headline<br></font></b><font face='Arial' size='1'><i>Posted on $date by $username<br></i></font><font face='Arial' size='2'>$story_short</font><font face='Arial' size='1'><br><u>Read More...</u></font></td></tr><tr><td width='100%'><img border='0' src='images/1_6.gif' width='375' height='1'></td></tr>";
}
//GET ALL OF THE ENTRIES FROM ONE CATEGORY IN A DIFFERENT ORDER
$result = mysql_query("SELECT * FROM `news` ORDER BY `date` DESC LIMIT 4 , 1");
while ($array = mysql_fetch_array($result)) {
$id = $array['id'];
$date = $array['date'];
$staffid = $array['staffid'];
$story_full = $array['story_full'];
$story_short = $array['story_short'];
$headline = $array['headline'];
//WHOSE CHILD IS THIS?!?!?
$result = mysql_query("SELECT `username`,`avatar` FROM `staff` WHERE `id` = '$staffid'");
while ($array = mysql_fetch_array($result)) {
$username = $array['username'];
$avatar = $array['avatar'];
echo "<tr><td width='100%'><img border='1' src='icons/rides/$avatar.gif' align='left' width='75' height='75'><b><font face='Arial' size='2'>$headline<br></font></b><font face='Arial' size='1'><i>Posted on $date by $username<br></i></font><font face='Arial' size='2'>$story_short</font><font face='Arial' size='1'><br><u>Read More...</u></font></td></tr>";
}
//DISCONNECT FROM THE DATABASE
mysql_close($link);
?>
Any clue what I did wrong?
~ Reality15
Owner of MIRollerCoast.com
Webmaster of PointXtreme.com