Could someone tell me why did you mark this error in my code?
Warning: mysql_fetch_row () expects parameter 1 to be resource, boolean given in C: \ xampp \ htdocs \ dashboard \ PROJECTFINALLP4 \ registerbd.php on line 61 *
I try to make a record and keep it in a database that I created, I leave the code:
<?php
$host = "127.0.0.1";
$user = "root";
$password = "";
$conectar = mysql_connect ($host, $user, $password);
mysql_select_db("proyectofinallp4", $conectar);
$id = $_POST["id"];
$nombre = $_POST["nombre"];
$password = $_POST["password"];
$consulta = "INSERT INTO usuarios id = '$id', nombre = '$nombre', password = '$password'";
$query = mysql_query ($consulta, $conectar);
$resultado = mysql_fetch_row ($query); //ESTA ES LA LINEA 61
if ($query == null) {
echo "<center><h1>ERROR AL REGISTRAR</h1></center>" . mysql_error();
}
else
{
echo "<center><h1>USUARIO REGISTRADO EXITOSAMENTE</h1></center>";
}
?>