How do I track completed surveys to make sure users can't do the same surveys again? I'm thinking the postback posts the offer ID but I don't understand the structure of the MYSQL database and make sure users can't complete the same offer twice. Should I add to the mysql database all Offer ID's completed by the user or something? can one cell contain multiple values?
have a offers text field in mysql data base. when a user completes an offer grab the content of the offer field and append an offer id to it like this offerid1fferid2fferid3fferid4 example: ..........mysql stuff $complete_offers = $row['offers']; $complete_offers .= ":".$offer; then update it in mysql then you can check wich offers were completed before displaying by exploding mysql field offers into an array using php explode: ................... mysql_stuff 104:116:10:252 $ar_offer = explode(":",$row['offers']); will give you an array Array{ [0] => 104 [1] => 116 [2] => 10 [3] => 252 } then you could use a for each loop or whatever to see if the user had completed the offer before.
another way of checking is add completed offer IDs into table and for checking, queue for the offerID and check if there are any matches