I m having an issue with my IPN script. Its fine for verifying payment etc but im trying to get it to input the data into a database. The user email and password entry prior to works fine but not the second one..
$item_name = $_POST[ item_name ];
$item_number = $_POST[ item_number ];
$payment_status = $_POST[ payment_status ];
$payment_amount = $_POST[ mc_gross ];
$payment_currency = $_POST[ mc_currency ];
$txn_id = $_POST[ txn_id ];
$receiver_email = $_POST[ receiver_email ];
$payer_email = $_POST[ payer_email ];
$email = $_POST[ item_name ];
$password = mt_rand(1000, 9999);
$Random = print_r($_POST);
mysql_query("INSERT INTO users (email, password) VALUES( ". mysql_escape_string($email) ." , ".md5($password)." ) ") or die(mysql_error());
mysql_query("INSERT INTO LNCH_Sales SET
item_name = %s ,
item_number = %s ,
payment_status = %s ,
payment_amount = %s ,
payment_currency = %s ,
txn_id = %s ,
receiver_email = %s ,
payer_email = %s ",
mysql_real_escape_string($item[ name ]),
mysql_real_escape_string($item[ number ]),
mysql_real_escape_string($payment[ status ]),
mysql_real_escape_string($payment[ amount ]),
mysql_real_escape_string($payment[ currency ]),
mysql_real_escape_string($txn[ id ]),
mysql_real_escape_string($receiver[ email ]),
mysql_real_escape_string($payer[ email ])
);
有什么想法吗? 这里有什么问题?