0
$query = "INSERT INTO patients (username, idn, email, mobilenumber, healthcenter, height, weight, city, state)
VALUES (:name, :id, :mail, :mn, :hc, :heightv, :weightv, :cityv, :statev) ";
//Again, we need to update our tokens with the actual data:
$query_params = array(
':name' => $_POST['username'],
':id' => $_POST['idn'],
':mail' => $_POST['email'],
':mn' => $_POST['mobilenumber'],
':hc' => $_POST['healthcenter'],
':hightv' => $_POST['height'],
':weightv' => $_POST['weight'],
':cityv' => $_POST['city'],
':statev' => $_POST['state']
);
//time to run our query, and create the user
try {
$stmt = $db->prepare($query);
$result = $stmt->execute($query_params);
}
在query_params你拼寫錯誤heightv – marcosh
什麼錯誤? –
@ chinna_82糾正typp' ':hightv'=> $ _ POST [ '高度']''到 ':heightv'=> $ _ POST [ '高度'],' – Sirko