Gathering a postback from another page

Okay I have been studying php for a few months now so bear with me (ive been learning as i go too, and most questions i have, i have found the answer to on this site or the tutorial site)

I have a site that users a point system. I have it all set up with the database and everything and everything works fine. Now, I wanted to set up a survey for my players to earn extra points. When a user finishes it the company (CPALead) sends a postback to the page of my choosing.

So i chose postback.php.

Simple right? Now I have to write the code, the site even gives me all the variables to use and here’s the list

$subid   = $_REQUEST['subid'];
$survey  = $_REQUEST['survey'];
$earn    = $_REQUEST['earn'];
$pdtshow = $_REQUEST['pdtshow'];

So I write the code and use basically the same way i update my database in every other portion of my script.

$result = mysql_query("update ".*******." set ****** = '$new_winnings' where ****** = $plyrname ");

]

But at the time i was using a header code and apparently the postback doesn’t complete if there is a header or “require” code in the script, it gave me a http error 302.

So my problem was if i couldn’t include anything I cant update the database because it is not getting information from the other pages of what the player name is or the old amount of points the player had previously.

I was looking into setting the postback.php and maybe requesting the post somehow from the players statistics page (where they see their points).

What form of coding can i use to grab the information from where they posted the information and then update it in the statistics portion?

i just tried using require

('postback.php');

on my users statistic page

i put in the code (to test i dont know if it will work) the code to update the database in the statistics page also but added

 if ($new_winnings > 0

before it starts to update, so that way it will update only if the postback is sent and the points are increased right?

Well anyways i did another survey and CPALead said the postback was sent to postback.php correctly. But no update was made. So now that the page is receiving the poastbacks. I just need to find a better way of gathering the information from postback.php