Hi, I am new to this IPN (instant payment notification.I am working for past 6 hours.I am using this IPN to store payment details in our database. when user clicks the paypal button in my page.it will take to paypal.com website.after user completes the payments.It will send the payment details to my page.where i can process and store in the database. This is the Code for paypal button: ----------------------------------- <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" disabled> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> <input type="hidden" name="notify_url" value="http://myadtv.com/Gauranga/confirmation_message.php"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="yvonne@xxxxxxxxxx"> <input type="hidden" name="item_name" value="Subscribe to Additional User Account Yearly"> <input type="hidden" name="item_number" value="2"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="bn" value="PP-SubscriptionsBF"> <input type="hidden" name="a1" value="0.00"> <input type="hidden" name="p1" value="3"> <input type="hidden" name="t1" value="D"> <input type="hidden" name="a3" value="59.95"> <input type="hidden" name="p3" value="1"> <input type="hidden" name="t3" value="Y"> <input type="hidden" name="src" value="1"> <input type="hidden" name="sra" value="1"> </form> ------------------------------------------------ my page code to process paypal ------------------------------ <? // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header = "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30); // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number=$_POST['item_number']; $shipping_status = $_POST['no_shipping']; $note_status = $_POST['no_note']; $currency = $_POST['currency_code']; $business_name = $_POST['bn']; $payment_amount = $_POST['a3']; $payment_duration_num = $_POST['p3']; $payment_duration = $_POST['t3']; $txn_id = $_POST['txn_id']; //$receiver_email = $_POST['receiver_email']; //$payer_email = $_POST['payer_email']; $payment_status = $_POST['payment_status']; if (!$fp) { print "$errstr ($errno)<br />\n"; } else { include('db.php'); $transactionidretrieveresult=mysql_query("select * from BillingInfo where Transaction_ID='$txn_id'"); fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { if(($payment_status=="Completed") and (!mysql_num_rows($transactionidretrieveresult))): //storing in Database; endif; } elseif (strcmp ($res, "INVALID") == 0) { print "Click The Link To Go To MyADTV Add New User Account Page<a href=\"adduseraccounts.php\">Click Here</a>"; } fclose ($fp); } ?> When i visit my page i am displaying this error Undefined index:item_name,Undefined index:item_number,Undefined index:a1,Undefined index:p1,Undefined index:t1,Undefined index:a3,and so on. I am waiting response from any one , __________________________________________________________ Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php