-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStoreGoalRecord.php
More file actions
26 lines (20 loc) · 900 Bytes
/
StoreGoalRecord.php
File metadata and controls
26 lines (20 loc) · 900 Bytes
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
<?php
$servername = "seekt.asia";
$username = "seektasi_fitness";
$password = "fitness53300";
$dbname = "seektasi_bus";
$con = mysqli_connect($servername,$username,$password,$dbname);
$fitnessRecordID = $_POST["id"];
$userID = $_POST["user_id"];
$goal_desc = $_POST["goal_desc"];
$goal_duration = $_POST["goal_duration"];
$goal_target = $_POST["goal_target"];
$createdAt = $_POST["createdAt"];
$updateAt = $_POST["updateAt"];
$statement = mysqli_prepare($con,"INSERT INTO Goal (id, user_id, goal_desc, goal_duration, goal_target, created_at, updated_at)
Values(?,?,?,?,?,?,?)");
mysqli_stmt_bind_param($statement,"sisiiss", $fitnessRecordID, $userID, $goal_desc, $goal_duration, $goal_target, $createdAt, $updateAt);
echo(mysqli_stmt_execute($statement));
mysqli_stmt_close($statement);
mysqli_close($con);
?>