这是数据库部分,该查询有助于在chat.php
上显示数据。我几乎尝试过,但是邮件未加载?为什么呢?
<meta name="mymeta" http-equiv="refresh" content="15" id="loading"/>
</script>
<?php
session_start();
if(isset($_SESSION['id'])) {
$id=$_SESSION['id'];
}
include 'dbconnection.php';
$_SESSION['lawyer']=$_GET['id'];
$id1=$_SESSION['lawyer'];
$sql="SELECT * from chat WHERE from_user_id=$id && to_user_id=$id1 or from_user_id=$id1 && to_user_id=$id ORDER by chat_date";
$result=$conn->query($sql);
if ($result->num_rows>0) {
while ($row=$result->fetch_assoc()) {
echo'<---display data--->';
<?php