failure to insert data in php


I have the following code:

                //obtener id usuario 

            $email = $_SESSION['usuario_email'];
            $nombreUsuario = $_SESSION['usuario_nombre'];
            $apellidoUsuario = $_SESSION['usuario_apellido'];
            $telefono = $_SESSION['usuario_telefono'];

            //echo $email . ' ' . $nombreUsuario . ' ' . $apellidoUsuario . ' ' . $telefono;

            $sql_id = "SELECT * FROM usuarios WHERE nombre='$nombreUsuario' and apellido='$apellidoUsuario' and telefono=$telefono";

            //subir a la base de datos
            $stmt = mysqli_stmt_init($conexion);

            if (!mysqli_stmt_prepare($stmt, $sql_id)) {
                echo "SQL statement failed! Fallooo";
                $result = mysqli_stmt_get_result($stmt);

                while($row = mysqli_fetch_assoc($result)){
                    $idUsuario = $row['id_usuario'];

And it gives me the following error


Fatal error: Call to undefined function mysqli_stmt_get_result ()

I've been breaking my head on several websites and the only thing I read is the issue of the drivers, but the web is uploaded to the server of the institute so I can not make any changes of this type. The data of name, surname and others I have checked and they are correctly, the case is that that function does not work to me. The others are from mysqli too and they have not given me an error, so I try to fix this or propose another function that performs the same as this one. I would appreciate a lot of help. Thank you very much in advance, greetings.

asked by Oscar Plumariega 27.12.2018 в 11:28

0 answers