I keep getting a parse error in line 10, the one that starts with "while"...
Any idea wat could be wrong?
CODE
<?php
/* Connecting, selecting database */
$link = mysql_connect("localhost", "database", "password")
or die("Could not connect");
print "Connected successfully";
mysql_select_db("base") or die("Could not select database");
$query = mysql_query('SELECT * FROM my_news');
// get all the news in the 'news' table
while($news = mysql_fetch_array($query)) (
echo "Title: " . $news['title'] . "n";
echo $news['text'] . "n";
echo "---------------------n";
)
?>
/* Connecting, selecting database */
$link = mysql_connect("localhost", "database", "password")
or die("Could not connect");
print "Connected successfully";
mysql_select_db("base") or die("Could not select database");
$query = mysql_query('SELECT * FROM my_news');
// get all the news in the 'news' table
while($news = mysql_fetch_array($query)) (
echo "Title: " . $news['title'] . "n";
echo $news['text'] . "n";
echo "---------------------n";
)
?>