grant Posted January 23, 2011 Posted January 23, 2011 ok ave got a super rewards on my site but wen i postback i dont get the points but its going in to the db ??? some help plz heres my code <?PHP include 'dbcon.php'; include 'classes.php'; $earn = ($_GET['new']); $id = ($_GET['id']); $totaluser = ($_GET['total']); $offerid = ($_GET['oid']); store_lead($_GET['oid'], $_GET['id'], $_GET['total'], $_GET['new']); echo 1; //store_lead function in classes.php// function store_lead($offerid, $id, $totaluser, $earn){ $result = mysql_query("SELECT * FROM `offers` WHERE `oid`='{$offerid}', `id`='{$id}', `total`='{$totaluser}', `new`='{$earn}'"); $result = mysql_query("INSERT INTO `offers` (`oid`, `id`, `total`, `new`) VALUES ('$offerid', '$id', '$totaluser', '$earn')"); $result1 = mysql_query("UPDATE `grpgusers` SET `points` = '$points + $earn WHERE `id`='".$id."'"); //give user points// } ?> Quote
URBANZ Posted January 23, 2011 Posted January 23, 2011 RE: post back try this it should work <?PHP include 'dbcon.php'; include 'classes.php'; $earn = ($_GET['new']); $id = ($_GET['id']); $totaluser = ($_GET['total']); $offerid = ($_GET['oid']); store_lead($_GET['oid'], $_GET['id'], $_GET['total'], $_GET['new']); echo 1; //store_lead function in classes.php// function store_lead($offerid, $id, $totaluser, $earn){ $result = mysql_query("SELECT * FROM `offers` WHERE `oid`='{$offerid}', `id`='{$id}', `total`='{$totaluser}', `new`='{$earn}'"); $result = mysql_query("INSERT INTO `offers` (`oid`, `id`, `total`, `new`) VALUES ('$offerid', '$id', '$totaluser', '$earn')"); $result1 = mysql_query("UPDATE `grpgusers` SET `points`=`points`+({$earn}) WHERE `id`='".$id."'"); //this line was edited } ?> Quote
grant Posted January 24, 2011 Author Posted January 24, 2011 try this it should work include 'dbcon.php'; include 'classes.php'; $earn = ($_GET['new']); $id = ($_GET['id']); $totaluser = ($_GET['total']); $offerid = ($_GET['oid']); store_lead($_GET['oid'], $_GET['id'], $_GET['total'], $_GET['new']); echo 1; //store_lead function in classes.php// function store_lead($offerid, $id, $totaluser, $earn){ $result = mysql_query("SELECT * FROM `offers` WHERE `oid`='{$offerid}', `id`='{$id}', `total`='{$totaluser}', `new`='{$earn}'"); $result = mysql_query("INSERT INTO `offers` (`oid`, `id`, `total`, `new`) VALUES ('$offerid', '$id', '$totaluser', '$earn')"); $result1 = mysql_query("UPDATE `grpgusers` SET `points`=`points`+({$earn}) WHERE `id`='".$id."'"); //this line was edited } ?> thanks it works a dream :D Quote
URBANZ Posted January 24, 2011 Posted January 24, 2011 np anymore support you need with grpg framewrok give me a pm ill be happy to help Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.