I have this function:
function get_news($id) {
$query = mysql_query("SELECT `author`, `title`, `message` FROM `news` WHERE `id` = $id");
$row = mysql_fetch_array($query);
$title = $row['title'];
$author_id = $row['author'];
$message = $row['message'];
}
and on my page I have this:
get_news($_GET['id']);
echo $title . '<br />' . $message;
However, the echo is not working at all. How can I grab the data from the function to make it work in the echo?