[php]
// Query the database.
$query = “SELECT article_title, article_intro, article_full, article_subject, main_id FROM main AS u, article_info AS ut WHERE ut.article_id = u.article_id AND u.user_id=$t AND u.approved = ‘Y’ ORDER BY date_submitted desc”;
$result = mysql_query ($query)
or die(mysql_error());
while($row = mysql_fetch_array($result))
{
$article_title=$row[‘article_title’];
$article_intro=$row[‘article_intro’];
$id=$row[‘article_id’];
// Print out the contents of the entry
echo ’ ’ .’ ‘.$article_title.’’ ."
";
echo “
”.$row[‘article_intro’].’… read more’."
";
}
[/php]
I need to have article_id as id, but it doesn’t know.
What I can do is have main_id as id and it takes me to main_id page, which is blank. (http://writeaway.igraphic.co.uk/view_article.php?id=42)
Please advice
ADMIN EDIT: Changed the CODE tags to PHP tags for Syntax Highlighting