so i tried updating this script to credit values such as 10, 20, etc. to users "ostatus". But it still only credits 1, and only 1. and the worst part, if a user does more then 1 offer, theyre account still only gets credited 1. please let me know what i did wrong.
if ($status == 1) {
//Added following for crediting Logic
if($ip == "75.126.157.90" or "204.10.140.62" or "204.10.140.63") $sql="select oWeight from offers where oCampID='" . $campaign . "'";
else $sql="select oWeight from offers where oName='" . $name . "'";
$result = mysql_query($sql);
$oWeight=0.0;
if($r=mysql_fetch_array($result))
{
if($r['oWeight']=='1')
$oWeight=1;
if($r['oWeight']=='5')
$oWeight=5;
if($r['oWeight']=='10')
$oWeight=10;
if($r['oWeight']=='20')
$oWeight=15;
if($r['oWeight']=='25')
$oWeight=25;
if($r['oWeight']=='30')
$oWeight=30;
if($r['oWeight']=='35')
$oWeight=35;
if($r['oWeight']=='45')
$oWeight=40;
if($r['oWeight']=='50')
$oWeight=50;
if($r['oWeight']=='60')
$oWeight=60;
}
//Updating ostatus with weightage rather then 1 or 0.
$totalO=0;
$currOStatus=mysql_result(mysql_query("SELECT `ostatus` FROM `users` WHERE `uid`='$sid'"),0);
if(($currOStatus+$oWeight)>1) $totalO=100;
else $totalO=$currOStatus+$oWeight;
$query="UPDATE users SET ostatus=" . $totalO . " WHERE uId='$sid'";
mysql_query($query) or die("Could not update status because ".mysql_error());
echo "<Center>Credit Given</center><br><br>";