ok here is what I have it works great but I need to optimize it better
<?
$query=mysql_query("SELECT u FROM friend_votes WHERE u='$profileid'")or die(" Error: ".mysql_error());
if (mysql_num_rows($query) == 0) {
$sql = "INSERT INTO friend_votes (`u`,`times`, `total`) VALUES ('$profileid', '0', '0')";
$result = mysql_query($sql);
}
$query=mysql_query("SELECT v FROM friend_votes_who WHERE t='$profileid' AND f='$myid'")or die(" Error: ".mysql_error());
if (mysql_num_rows($query) == 0) { //show rate form
echo '<link rel="stylesheet" type="text/css" href="css/rating.css" /><div id="container"><div class="botlink"><div id="unit_long1156"> <ul id="unit_ul1156" class="unit-rating" style="width:150px;"> <li class="current-rating" style="width:0px;">Currently 0.00/5</li><li><a href="/rate/rateuser.php?&t='.$profileid.'&v=1" title="1 out of 5" class="r1-unit rater" rel="nofollow">1</a></li><li><a href="/rate/rateuser.php?&t='.$profileid.'&v=2" title="2 out of 5" class="r2-unit rater" rel="nofollow">2</a></li><li><a href="/rate/rateuser.php?&t='.$profileid.'&v=3" title="3 out of 5" class="r3-unit rater" rel="nofollow">3</a></li><li><a href="/rate/rateuser.php?&t='.$profileid.'&v=4" title="4 out of 5" class="r4-unit rater" rel="nofollow">4</a></li><li><a href="/rate/rateuser.php?&t='.$profileid.'&v=5" title="5 out of 5" class="r5-unit rater" rel="nofollow">5</a></li> </ul> <p>Rating: <strong> 0.0</strong>/5 (0 votes cast) </div></p></div></div></div></div>';
} else {
echo 'You Already Rated this User';
} ?>
On this line below, how can I show the value of v like
echo 'You Rated this User $v';
$query=mysql_query("SELECT v FROM friend_votes_who WHERE t='$profileid' AND f='$myid'")or die(" Error: ".mysql_error());