Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
SDClowen committed Oct 10, 2024
1 parent 556e057 commit 0c6201c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/controllers/Participate.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,17 @@ public function apply()
if ($validate)
warning($validate);

$result = false;
if ($survey->verifyPhone) {
$result = Database::get()->from("answers")
$result = $this->db->from("answers")
->where("surveyId", "=", $surveyId)
->where("personalId", "=", $user->personalId)
->update([
"data" => data_json($post),
"done" => 1
]);
} else {
$result = Database::get()->from("answers")
$result = $this->db->from("answers")
->insert([
"surveyId" => $surveyId,
"personalId" => 0,
Expand All @@ -281,7 +282,8 @@ public function apply()

if ($result) {
session_destroy();
successlang("survey.successfully.answered", redirect: "/successfully/$slug:2500");
successlang("survey.successfully.answered");
#redirect: "/successfully/$slug:2500"
}

getDataError();
Expand Down

0 comments on commit 0c6201c

Please sign in to comment.