Hi i want to update id row when a user click the button below please help and sorry for my bad english
index.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<a href="javascript:void(0)" onClick="updateId('1')">Id 1</a>
<a href="javascript:void(0)" onClick="updateId('2')">Id 2</a>
<a href="javascript:void(0)" onClick="updateId('3')">Id 3</a>
</body>
</html>
update.php
<?php
include('database_connection.php');
$update = "UPDATE id SET id = id + 1 WHERE id = updateId";
if (mysqli_query($connect, $update)) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . mysqli_error($connect);
}
?>