i have got so far . i have tried loads of variations of codes etc. cant get it to update correctly with the amount you click on . plus its only updating my own profile by 1 everytime i choose something. even if its a 9 it only goes up by 1.
it dont update other users at all .so as u see i need help lol . i done the hard work then get stuck.
can anyone help . ta
this is in profile
this is genproc to update it
put me out my misery pmpl .
it dont update other users at all .so as u see i need help lol . i done the hard work then get stuck.
can anyone help . ta
this is in profile
Code:
echo "<form action=\"genproc.php?action=rate&sid=$sid\" method=\"post\"><p align=\"center\">";
echo "<select name=\"rate\">";
echo "<option value=\"1\">1</option>";
echo "<option value=\"2\">2</option>";
echo "<option value=\"3\">3</option>";
echo "<option value=\"4\">4</option>";
echo "<option value=\"5\">5</option>";
echo "<option value=\"6\">6</option>";
echo "<option value=\"7\">7</option>";
echo "<option value=\"8\">8</option>";
echo "<option value=\"9\">9</option>";
echo "<option value=\"10\">10</option>";
echo "</select>";
echo "<input type=\"Submit\" Name=\"Rate\" Value=\"Rate\"></form>";
$nopl = mysql_fetch_array(mysql_query("SELECT rate FROM wap_users WHERE id='".$who."'"));
echo "[b]Rating:[/b] $nopl[0]
";
Code:
////////////////////
else if($action=="rate")
{
$rate = $_POST["rate"];
$bid = $_GET["bid"];
addonline(getuid_sid($sid),"Rating a member","");
//$uid = getuid_sid($sid);
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$res = mysql_query("UPDATE wap_users SET rate='".$rate."' WHERE id='".$uid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/> rated successfully
";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!
";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>You have rated this user before
";
echo "
";
echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p></body>";
}
Comment