Hi all,
I have uploaded a copy of my access database as .sql to my website and created a table in the mysql database.
Also done a html form of the database and a prosses.php. Evey time I run it I get the following error :
Parse error: syntax error, unexpected ':', expecting ',' or ')' in /home/u439293252/public_html/Health/process_cu.php on line 1
I cant see it. Can anyone help ?
code :
I have uploaded a copy of my access database as .sql to my website and created a table in the mysql database.
Also done a html form of the database and a prosses.php. Evey time I run it I get the following error :
Parse error: syntax error, unexpected ':', expecting ',' or ')' in /home/u439293252/public_html/Health/process_cu.php on line 1
I cant see it. Can anyone help ?
code :
Code:
<?php $id = isset($_POST['id'] : $_POST['id'] : null; $date = isset($_POST['date'] : $_POST['date'] : null; $bp = isset($_POST['bp'] : $_POST['bp'] : null; $weight = isset($_POST['weight'] : $_POST['weight'] : null; $cholesterol = isset($_POST['cholesterol'] : $_POST['cholesterol'] : null; $hba1c% = isset($_POST['hba1c%'] : $_POST['hba1c%'] : null; $hba1cmmol = isset($_POST['hba1cmmol'] : $_POST['hba1cmmol'] : null
$db = new mysqli("?????", "?????_admin", "?????", "?????_healt"); if ($db->errno) die("Error opening database: " . $db->error());
$query = 'INSERT INTO `users` (`id`, `date`, `bp`, `weight`, `cholesterol`, `hba1c%`, `hba1cmmol`) VALUES (?, ?, ?, ?, ?, ?, ?,)'; $result = $db->prepare($query); $result->bind_param('sssssss', $id, $date, $bp, $weight, $cholesterol, $hba1c%, $hba1cmmol; $result->execute(); free($result); ?>
CODE]