Good day! Help plz. sort out. It is necessary to make a copy of the goods within the same sql table. For example, there is a table of goods from the intern store and there are similar products that are too lazy to re-enter every time, but it would be convenient to click on a similar product "Copy", correct the necessary data and add as a new product.
I wanted to do it on the basis of the delete function, replacing $ action with $ action_copy and "delete" with "copy", but failed
$action = $_GET["action"]; if (isset($action)) { $id = (int)$_GET["id"]; switch ($action) { case 'delete': if ($_SESSION['delete_tovar'] == '1') { $delete = mysql_query("DELETE FROM category WHERE id = '$id'",$link); }else { $msgerror = 'Π£ Π²Π°Ρ Π½Π΅Ρ ΠΏΡΠ°Π² Π½Π° ΡΠ΄Π°Π»Π΅Π½ΠΈΠ΅ ΡΠΎΠ²Π°ΡΠΎΠ²!'; } break; } }