php picture rating
Posted: Wed Aug 13, 2008 4:59 am
how to display the highest rated picture from data base containing ratings of different users for same picture i need some idea regarding this
this code i have used to insert rating of the picture
so i need the help for displaying highest rated picture first in home page
thank u
haritha
Code: Select all
<?php
if($_POST)
{
extract($_POST);
$rate=$_POST["rate"];
$image=$_POST["image"];
//echo $imageid=$_POST["imageid"];
/*$result1=mysql_query("SELECT * FROM netkushi_rating");
While($row = mysql_fetch_assoc($result1))
{
$id=$row["id"];
$image=$row["image"];
}*/
$sql = "INSERT INTO netkushi_rating (`image` ,`rate`)VALUES ('$image','$rate')";
mysql_query($sql);
$v="inserted";
}
?>so i need the help for displaying highest rated picture first in home page
thank u
haritha