low tech
11-07-2010, 10:14 AM
Hi all
after all the hard work ,now I get this
unexpected ';' a---- nd IF I remove that I get
unexpected T_IF
Any help here would be fantastic ---- I have no idea:-(
The offending llines are
$nm = mysql_num_rows($the_result);
if ($nm == 0)
I tried to hightlight them but of course that didn't work hahahhaa
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0) {
// check the payment_status is Completed
// on error notify
if (($payment_status == ‘Completed’) &&
($receiver_email == $notify_email) && // receiver_email === yr account email
($mc_gross == $amount_required ) && //payment === yr reqd payment
($mc_currency == $mycurrency)) {
//create MySQL connection
$Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password)
or die("Couldn't connect to MySQL:<br>" . mysql_error() . "<br>" . mysql_errno());
//select database
$Db = @mysql_select_db($DB_DBName, $Connect)
or die("Couldn't select database:<br>" . mysql_error(). "<br>" . mysql_errno());
//check if transaction ID has been processed before
// on error notify
$checkquery = "SELECT txn_id FROM users WHERE txn_id='".$txn_id."'";
$the_result = mysql_query($checkquery, $Connect) or die("Duplicate txn id check query failed:<br>" . mysql_error() . "<br>" . // mysql_errno());
$nm = mysql_num_rows($the_result);
if ($nm == 0)[ {
////execute query
mysql_query(CODE THAT GOES HERE IS TESTE)
// PAYMENT VALIDATED & VERIFIED!
$mail_From = "From: me@mybiz.com";
$mail_To = "me@mybiz.com";
$mail_Subject = "VERIFIED IPN";
$message = "
Thank you for registering ";
$headers = 'From:myself@mybiz.com' . "\r\n";
mail($mail_To, $mail_Subject, $message . "\n\n" . $mail_From, $headers);
}else{
// DUPLICATE: error notify
mail($notify_email, "VERIFIED DUPLICATED TRANSACTION", "$user_email\n $result\n $payment_status\n $receiver_email\n $mc_gross\n $mc_currency");
}
}else {
// PAYMENT: error notify
mail($notify_email, "Payment PROBLEM", "$user_email\n $payment_status\n $reciever_email\n $mc_gross\n $mc_currency");
}
}
elseif (strcmp ($res, "INVALID") == 0) { OTHER CODE HERE}
LT
after all the hard work ,now I get this
unexpected ';' a---- nd IF I remove that I get
unexpected T_IF
Any help here would be fantastic ---- I have no idea:-(
The offending llines are
$nm = mysql_num_rows($the_result);
if ($nm == 0)
I tried to hightlight them but of course that didn't work hahahhaa
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0) {
// check the payment_status is Completed
// on error notify
if (($payment_status == ‘Completed’) &&
($receiver_email == $notify_email) && // receiver_email === yr account email
($mc_gross == $amount_required ) && //payment === yr reqd payment
($mc_currency == $mycurrency)) {
//create MySQL connection
$Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password)
or die("Couldn't connect to MySQL:<br>" . mysql_error() . "<br>" . mysql_errno());
//select database
$Db = @mysql_select_db($DB_DBName, $Connect)
or die("Couldn't select database:<br>" . mysql_error(). "<br>" . mysql_errno());
//check if transaction ID has been processed before
// on error notify
$checkquery = "SELECT txn_id FROM users WHERE txn_id='".$txn_id."'";
$the_result = mysql_query($checkquery, $Connect) or die("Duplicate txn id check query failed:<br>" . mysql_error() . "<br>" . // mysql_errno());
$nm = mysql_num_rows($the_result);
if ($nm == 0)[ {
////execute query
mysql_query(CODE THAT GOES HERE IS TESTE)
// PAYMENT VALIDATED & VERIFIED!
$mail_From = "From: me@mybiz.com";
$mail_To = "me@mybiz.com";
$mail_Subject = "VERIFIED IPN";
$message = "
Thank you for registering ";
$headers = 'From:myself@mybiz.com' . "\r\n";
mail($mail_To, $mail_Subject, $message . "\n\n" . $mail_From, $headers);
}else{
// DUPLICATE: error notify
mail($notify_email, "VERIFIED DUPLICATED TRANSACTION", "$user_email\n $result\n $payment_status\n $receiver_email\n $mc_gross\n $mc_currency");
}
}else {
// PAYMENT: error notify
mail($notify_email, "Payment PROBLEM", "$user_email\n $payment_status\n $reciever_email\n $mc_gross\n $mc_currency");
}
}
elseif (strcmp ($res, "INVALID") == 0) { OTHER CODE HERE}
LT