I am getting the following error message with a callback script from a payment gateway designed to place info into the MySQL DB:
Parse error: parse error, expecting T_STRING' orT_VARIABLE' or
`T_NUM_STRING' in /var/www/html/subscription/subscription_callback.php on line 65
For the following code (only has 61 lines?):
<?php
/
Written 23/04/2002
Author PH
Callback URL from Payment Gateway
** Puts details of transaction in database.
/
require("../INC_common.php");
$conn = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD)
or die ("Could not connect to Database Server");
mysql_select_db(DB_NAME, $conn) or die ("Could not select the Database.");
if($M_have_package == "Y"){
Put details of subscription in database
if($M_package == "so"){
$property_num = 50;
} else
if($M_package == "tw"){
$property_num = 100;
} else
if($M_package == "mu"){
$property_num = 200;
} else
if($M_package == "me"){
$property_num = 400;
}
$query = <<<END_QUERY
update clients
set live_date='now()', property_num='$property_num', currency='$M_currency',
subscription_length='$M_length'
where client_id='$M_client_id'
END_QUERY;
mysql_query($query)
or die(mysql_error());
}
if($M_have_sms == "Y"){
Add sms credits
$query = <<<END_QUERY
select sms_credits from clients where client_id='$M_client_id'
END_QUERY;
$result = mysql_query($query)
or die(mysql_error());
$row = mysql_fetch_array($result);
$new_sms = $row["sms_credits"] + $M_sms;
$query = <<<END_QUERY
update clients
set sms_credits='$new_sms', currency='$M_currency'
where client_id='$M_client_id'
END_QUERY;
mysql_query($query)
or die(mysql_error());
}
?>
Some people say a $ or " is missing, but can't find anything wrong with this?? Please help, Thanks, JR