The query is not being carried out, would you be so kind as to guide me on my error?
<?php
require "conection.php";
$mi_busqueda = $_POST['mi_busqueda'];
$insert_query = $con->prepare("INSERT INTO hist_less_cred (id_student)
SELECT id_student
FROM students
WHERE student_qr = ?");
$insert_query->bind_param("is", $mi_busqueda);
$insert_query->execute();
header ('Location: qr_lector.php');
exit();
?>
the insert inside the other table does not carry it out