I can’t resolve my problem, this is the error from mysql that I’m getting:
I can edit and update my data when I’ve got one record in the database but when I add two rows, I get the error.
Some pictures from database
And when I change the row, row ID goes down to 0 and that’s is a problem as I can’t edit other rows.
CREATE TABLE `dati` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`value1` varchar(255) NOT NULL,
`value2` varchar(255) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 PACK_KEYS=1
Update Code:
alert(" Ieraksts ir veiksmīgi labots! ");
window.location.href = "https://stackoverflow.com/questions/79334236/index.php";
';
mysqli_close($con);
}
?>
From form:
";
echo " ";
echo " ";
echo " ";
echo "";
echo " ";
echo "";
}
mysqli_close($con);
?>
It couldn’t read the value of ID, as 0 was returned.