我的PHP代碼不起作用。爲什麼我的SQL PHP代碼不工作?
<?php
include config.php;
function addEntryInDB() {
$nxtaddr = $_POST ["txin_src"];
$nxtkey = $_POST ["txin_key"];
$coinaddr = $_POST ["txout_src"];
$burntxid = $_POST ["txid"];
$coinkey = $_POST ["txout_src"];
mysql_select_db($sql_db, $conn);
if(!$conn) {
die('Could not connect: ' . mysql_error());
}
$sql = ("INSERT INTO X (
NXTAddress,
NXTPubKey,
AltCoinAddr,
AltCoinKeys,
PoBTXID,
ContactDateCreated
)
VALUES (
'$nxtaddr',
'$nxtkey',
'$coinaddr',
'$coinkey',
'$burntxid',
NOW()
)")
mysql_query($sql, $conn);
mysql_close($conn);
}
我大部分意想不到的T_STRING相關的錯誤。我知道這尖叫業餘小時,但任何幫助將是嗯...有幫助
缺少';查詢後'。 –
缺少分號 – Ceeee