From 31f3ab0d79f2aac567b9555b5d5eb0a6f7849ccc Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Wed, 26 Jul 2023 16:12:06 -0500 Subject: [PATCH] Updated the backend code; I don't know why I was modifying the user --- updatelink.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updatelink.php b/updatelink.php index 1c829a7..5e27e05 100644 --- a/updatelink.php +++ b/updatelink.php @@ -11,8 +11,8 @@ $row_id = $result[0]['id']; -$statement = $session->prepare('UPDATE data SET shortlink=?, url=?, user=? WHERE id=?;'); -$new_result = $session->execute($statement,array('arguments' => array($_POST['link'], $result[0]['url'], $result[0]['user'], $row_id))); +$statement = $session->prepare('UPDATE data SET url=? WHERE id=?;'); +$new_result = $session->execute($statement,array('arguments' => array($_POST['url'], $row_id))); http_response_code(204); ?>