I cannot find the 'unexpected T_var"
/* Prepared statement, stage 1: prepare */
if (!($stmt = $mysqli->prepare(“INSERT INTO test(id) VALUES (?)”))) {echo “Prepare failed: (” . $mysqli->errno . ") " . $mysqli->error;}
/* Prepared statement, stage 2: bind and execute */
$id = 1;
if (!$stmt->bind_param(“i”, $id)) {cho “Binding parameters failed: (” . $stmt->errno . ") " . $stmt->error;}
}
if (!$stmt->execute()) {echo “Execute failed: (” . $stmt->errno . ") " . $stmt->error;}
/* Above script executed in my script as follows …*/
[php]/
$id = 1;
$hits = 223;
$amount = 1.00;
$item_name = ‘book’;
$mc_gross = 0.00;
$email = ‘[email protected]’;
$first_name = ‘FirstName’;
$last_name = ‘LastNames’;
$address1 = ‘Addr01’;
$address2 = ‘Addr02’;
$city = ‘city’;
$state = ‘MI’;
$zip = 48118;
$country = ‘US’;
$USIT_txt = true;
$invoiceNo = 40814;
$expense_date= ‘’;
$updated = ‘’;
/*
$mysqli->query(CREATE TABLE testTABLE
( //Built in phpADMin
id
int(6) unsigned NOT NULL auto_increment, //i iddsdsssssssdssdss (18 count)
hits
int(6) unsigned NOT NULL default ‘0’, //d
amount
char(6) default NULL, //d
item_name
char(10) default NULL, //s
mc_gross
char(6) default NULL, //d
email
char(40) default NULL, //s
first_name
char(20) NOT NULL default ‘’, //s
last_name
char(40) NOT NULL default ‘’, //s
address1
char(100) NOT NULL default ‘’, //s
address2
char(100) NOT NULL default ‘’, //s
city
char(50) NOT NULL default ‘’, //s
state
char(6) NOT NULL default ‘’, //s
zip
char(12) NOT NULL default ‘’, //d
country
char(6) NOT NULL default ‘’, //s
USIT_txt
char(6) NOT NULL default ‘’, //s
invoiceNo
char(20) NOT NULL default ‘’, //d
expense_date
date NOT NULL default ‘0000-00-00’, //s
updated
timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, //s
PRIMARY KEY (id
),
KEY invoiceNo
(invoiceNo
)
ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1
)
*/
$stmnt = $mysqli->prepare(“INSERT INTO testTABLE(
id, hits, amount, item_name, mc_gross, email, first_name, last_name, address1, address2, city, state,
zip, country, USIT_txt, invoiceNo, expense_date, updated
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)”)
//Line 64 (next below): “unexpected T_VARIABLE “ <<<<<Where is it?<<<<<<<<
$stmt->bind_param(‘iddsdsssssssdssdss’, $id, $hits, $amount, $item_name, $mc_gross, $email, $first_name, $last_name, $address1, $address2, $city, $state, $zip, $country, $USIT_txt, $invoiceNo, $expense_date, $updated)
if (!$stmt->execute()) {
echo “Execute failed: (” . $stmt->errno . ") " . $stmt->error;
}
[/php]