Ver original$variable = rand(1,9999); $cosa = mysqli_query($conexion, "INSERT INTO cosa(numero) VALUES ('".$variable."')")or die(mysqli_error();