I am having trouble getting this code to work not sure how to make it work.
if ($_POST[‘fform’] == ‘allocate’) {
$res = mysql_query(“select * from site where usrid=$usrid”);
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$allocate = $allocate[$i];
$id = $id[$i];
$url = $url[$i];
if (is_numeric($allocate) && $allocate <= $credits && $allocate >= 0) {
$allocate = round($allocate, 1);
$res2 = mysql_query(“update site set credits=credits+$allocate where id=$id”);
$credits = $credits - $allocate; }
elseif (is_numeric($allocate) && $allocate >= 0) {
$credits = $credits - $allocate;
$res2 = mysql_query(“update site set credits=credits+$allocate where id=$id”); } }
$res = mysql_query(“update user set credits=$credits where id=$usrid”);
header("Location: ".$self_url.“members/?done&”.session_name() . “=” . session_id());
mysql_close;
exit;
The form that is being posted to the above is:
if ($credits > 1) { echo(“them”); }
else {echo(“it”);}
echo(" to the following site(s):
URL | Site credits | Allocate |
$url | $scred | |
Thanks For Any Help
Lee Qualls
http://www.leequalls.com