$('.timesea').on('click', function (event) {
OpenModal();
let elem = event.target;
let b1 = $(this).text();
console.log(elem);
console.log(b1);
$.ajax({
url:"test.php",
data:b1 ,
success:function(result){
console.log(result);
}
});
})
<?php
$b1 = $_POST['b1'];
include('connection.php');
$result = mysql_query("SELECT name FROM schedule WHERE b1 = '".$b1."'");
?>