You're missing the code to execute the
UPDATE
query.
Something like this should work:
if (isset($_GET['id']))
{
$i = $_GET['id'];
$sql = "UPDATE tblconcerns SET read_status=1 WHERE message_id = $i";
mysqli_query($conn, $sql);
}
$sql = "SELECT * FROM tblconcerns WHERE message_id = $i";
$result = mysqli_query($conn, $sql);
However, this code is vulnerable to
SQL Injection[
^]. You need to use
preparent statements[
^] to pass the parameter to the query.
if (isset($_GET['id']))
{
if ($stmt = mysqli_prepare($conn, "UPDATE tblconcerns SET read_status = 1 WHERE message_id = ?"))
{
$id = $_GET['id'];
mysqli_stmt_bind_param($stmt, "id", $id);
mysqli_stmt_execute($stmt);
}
}