Insert into not working

#1
 $conexion= new mysqli("localhost", "******root", "*******", "*****");

 if($conexion->connect_errno){
 	echo "Fallo la conexion" . $conexion->connect_errno;
 }
$consulta="INSERT INTO `tabla_1` (`ID`, `CODIGO`) VALUES ('1', 'codigo html 2');";

$resultado=$conexion->query($consulta);


same code working well on local (xamp)

(sorry about my english)
#2

Try

$resultado=$conexion->query($consulta)or die(mysqli_error($connexion));
1 Like