-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStoreHealthProfile.php
38 lines (32 loc) · 1.28 KB
/
StoreHealthProfile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
$servername = "seekt.asia";
$username = "seektasi_fitness";
$password = "fitness53300";
$dbname = "seektasi_bus";
$con = mysqli_connect($servername, $username,$password,$dbname);
if (!$con) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$healthprofileid = $_POST["id"];
$userID = $_POST["user_id"];
$weight= $_POST["weight"];
$BP = $_POST["blood_pressure"];
$RHR = $_POST["resting_heart_rate"];
$ArmG = $_POST["arm_girth"];
$ChestG = $_POST["chest_girth"];
$CalfG = $_POST["calf_girth"];
$ThighG = $_POST["thigh_girth"];
$Waist = $_POST["waist"];
$HIP = $_POST["hip"];
$Time = $_POST["created_at"];
$Update = $_POST["updated_at"];
$statement = mysqli_prepare($con,"INSERT INTO `Health_Profile`(`id`, `user_id`, `weight`, `blood_pressure`, `resting_heart_rate`, `arm_girth`, `chest_girth`, `calf_girth`, `waist`, `hip`, `thigh_girth`, `create_at`, `updated_at`)
VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)");
if ($statement) {
mysqli_stmt_bind_param($statement,"sidiiddddddss",$healthprofileid, $userID, $weight, $BP, $RHR, $ArmG, $ChestG, $CalfG, $ThighG, $Waist, $HIP, $Time, $Update);
echo(mysqli_stmt_execute($statement));
}
mysqli_stmt_close($statement);
mysqli_close($con);
?>