Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $user_id = get_current_user_id();
- $prescription_name = $_POST['prescription_name'];
- $date_created = date('Y-m-d');
- $last_updated = date('Y-m-d');
- $right_eye_sphere = $_POST['right_eye_sphere'];
- $left_eye_sphere = $_POST['left_eye_sphere'];
- $right_eye_cylinder = $_POST['right_eye_cylinder'];
- $left_eye_cylinder = $_POST['left_eye_cylinder'];
- $right_eye_axis = $_POST['right_eye_axis'];
- $left_eye_axis = $_POST['left_eye_axis'];
- $pd = $_POST['pd'];
- $date_of_birth = $_POST['date_of_birth'];
- $file_path = $_POST['file_path'];
- $add_query = "INSERT INTO wew_prescription (
- prescription_id,
- user_id,
- prescription_name,
- date_created,
- last_updated,
- right_eye_sphere,
- left_eye_sphere,
- right_eye_cylinder,
- left_eye_cylinder,
- right_eye_axis,
- left_eye_axis,
- pd,
- date_of_birth,
- file_path
- ) Values (
- NULL,
- {$user_id},
- '{$prescription_name}',
- '{$date_created}',
- '{$last_updated}',
- '{$right_eye_sphere}',
- '{$left_eye_sphere}',
- '{$right_eye_cylinder}',
- '{$left_eye_cylinder}',
- '{$right_eye_axis}',
- '{$left_eye_axis}',
- '{$pd}',
- '{$date_of_birth}',
- '{$file_path}'
- )";
- $sql = $dbCon->query($add_query);
- if (!mysqli_query($dbCon,$sql)){
- die('Error: ' . mysqli_error($dbCon));
- }else{
- mysqli_query($dbCon,$sql);
- echo "dados atualizados!";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement