Username: epiz_29160986
(please specify the website or account you are asking about)
There is connection but data failed inserted into database I get an error message
Error Message
These are my codes…
<?php include_once("db.php"); if (isset($_POST['submit'])) { // code... $username = $_POST['username']; $password = md5($_POST['password']); } //if all field are filled no empty field $query = "INSERT INTO users(username, password) VALUES('$username','$password');"; $run = mysqli_query($conn, $query); //Check if data is inserted into Database if (!$run) { echo "Error : cannot add to database: ".mysqli_errno($conn); } else { echo"No Problem"; } ?>(please share the FULL error message you see)
I get an error said
Error : cannot add to database: 1046