I have paypal IPN setup, but I am trying to have it check for a submitted value in the mysql to see if it exists. If not, then it wouldn't go through, but if it doesn't it goes to paypal page. Please pm me!
There are severl fields that paypal posts to your IPN script. To keep each payment entry unique use txn_id. you didn't tell about exact value that you wish to compare, am using txn_id for purpose of example: $txn_id = htmlspecialchars($_POST['txn_id']); $res = mysql_query("select * from <TABLE_NAME> where txn_id='$txn_id'"); if(mysql_numr_rows($res) == 0) { #entry not found ...... } else { #ENTRY FOUND } Code (markup):