Itβs good to get used to indicate your fields like this
INSERT INTO users (username,password) VALUES ( '$username', '$hashedPassword')
Or, if you want to specify the id field, also use NULL
INSERT INTO users (id,username,password) VALUES (NULL, '$username', '$hashedPassword')
By specifying the fields, your code is less likely to break if, for example, you add an additional field to the table.
source share