หน้า login
<html>
<head>
<title>เติมเงิน</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<table width="625" border="0" align="center" cellpadding="1" cellspacing="1">
<form method="post" action="tmrequest.php"><tr>
<td width="124"><font size="2">รหัสบัตร 14 หลัก</font></td>
<td width="356"><input name="truemoney_password" type="text" size=50 maxlength="14"><input type="hidden" name="usermem" value="peter"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="เติมเงิน"></td>
</tr></form>
</table>
</body>
</html>
หน้า tmrequest.php
<?php
$truemoney_password = $_POST[truemoney_password];
function tmn_refill ($truemoney_password)
{
if(function_exists('curl_init'))
{
$curl =
curl_init('[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php’);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
curl_setopt($curl, CURLOPT_HEADER, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
$curl_content = curl_exec($curl);
curl_close($curl);
}
else
{
$curl_content = file_get_contents('[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php’);
}
if(strpos($curl_content,'SUCCEED') !== FALSE)
{
return true;
}
else
{
return false;
}
}
?>
หน้า tmpay_result
<?php
require_once "connectdb.php";
$transaction_id = $_GET[‘transaction_id’];
$password = $_GET[‘password’];
$amount = $_GET[‘amount’];
$status = $_GET[‘status’];
$usermem = $_GET[usermem]
if( $status === 1 )
{
$sql_update= "update member set status = '$status',point = '$amount' where usermem = '$usermem'";
mysql_query($sql_update);
echo "SUCCEED";
}
else
{
/* ไม่สามารถเติมเงินได ้ */
die(‘ERROR|ANY_REASONS’);
}
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
</body>
</html>
มันขึ้น error ว่า
Parse error: syntax error, unexpected T_STRING in /home/vdogirl/domains/xxxxxx.com/public_html/vdo/tmrequest.php on line 19
หาเท่าไหร่ก็ไม่เจอครับ ว่าผิด syntax ตรงไหน
รบกวนผู้รู้ช่วยดูทีครับ