';
echo $risk . '
';
$pdo = new PDO('mysql:host=localhost; dbname=health; charset=utf8','web','1234');
$sql = $pdo->prepare('INSERT INTO heart VALUES (null,?,?)');
if ($sql->execute([$score, $risk]))
echo '新增成功 ! ' . '
';
else
echo '新增失敗 ! ' . '
';
?>