It is necessary to update the line in the database, the sql query is working on the line, but not on the site.

<?php session_start(); require_once('bd.php'); $taskid = 181; $taskname = "aaa"; $tasktext = "bbb"; $result = mysqli_query($con, "UPDATE `oc_product_description` SET name='$taskname', description='$tasktext' WHERE product_id=$taskid"); ?> 
  • one
    He works. Just you forget to get the result of the query. And in vain - it could be seen and understood that the server does not like ... - Akina

1 answer 1

Instead

 $result = mysqli_query($con, "UPDATE `oc_product_description` SET name='$taskname', description='$tasktext' WHERE product_id=$taskid"); 

write

 $result = mysqli_query($con, "UPDATE `oc_product_description` SET name='$taskname', description='$tasktext' WHERE product_id=$taskid") or exit(mysqli_error($con)); 

so that the error text is displayed to you when it occurs.