0

I am trying to do a php script that tells if does not exist an user registered. I read php official specification and still don't why the error. My php file is hosted in free hostinger (aka 000webhost). I don't know if this is the problem. This is the php code:

        error_reporting(E_ALL);
        $conexion= mysqli_connect('localhost', 'id17662034_acsg', '');
        if(mysqli_connect_errno())
              echo "Falló la conexión al servidor";
      
             $consulta=mysqli_prepare($conexion, 'select * from registrousuarios where usuario=?');
               mysqli_stmt_bind_param($consulta,'s',$usuario);
               $usuario="Ariel";
               mysqli_stmt_execute($consulta);
                 mysqli_stmt_bind_result($consulta,$resultado);
            if($resultado =="") {
               echo "<html><body><p>Error</p></body></html>";
               exit;
            }
            
?>

My password for database is in the last field of "mysqli_connect". Just is unnecessary here.

Ariel
  • 1
  • 1

0 Answers0