hi again!
i have a index.php which displays new from a mysql database!
below the last post, i have two buttons which allows the users tp view all the news, sorted by date or name.
both links defines the variable 'newsort' to either 'bydate' or 'byname'.
And then i got this script in top of the page
if ($newsort == bydate) {
$query = "SELECT title,adress,body,link,submitted,date FROM news ORDER BY submitted Desc";
}
if ($newsort == byname) {
$query = "SELECT title,adress,body,link,submitted,date FROM news ORDER BY title DESC";
}
if (!$newsort) {
$query = "SELECT title,adress,body,link,submitted,date FROM news ORDER BY timestamp DESC LIMIT 4";
}
$news = mysql_query($query);
But for some strange reason, going to either index.php?newsort=bydate, or newsort=byname gives me a pretty strange result.
The normal news displaying is not workinb aswell, however thats another story.
You can go http://lorenscorn.net/dicemania/ and try it.
thanks