<div id="refresh">
<?php
if(isset($_POST["from"]))
{
$mysqli = new mysqli("localhost", "root", "", "library");
if ($mysqli->connect_errno) {
echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;}
else
{
session_start();
if(!isset($_SESSION['name'])&&issset($_SESSION['password'])){
header("location:logi.html");
}
else{
$send=$_POST["from"];
echo "$send";
$nm=$_SESSION['name'];
$result=$mysqli->query("select SEND from request where RECE='$nm';");
$row=$result->fetch_assoc();
$sender=$row['SEND'];
$mysqli->real_query("SELECT name, msg FROM message WHERE receiver = '$send' AND name = '$nm' OR receiver = '$nm' AND name = '$send' LIMIT 0 , 30;");
$res=$mysqli->use_result();
while($row=$res->fetch_assoc())
{
echo ">" .$row['name'].":". $row['msg'] . "\n <br>";
}
}
}
}
?>
</div>
hey frnds
this is a div content of my code....i want to refresh it at a regular time interval.... i know about .load() of jquery........but is there any other way to do this.....googled all over but couldn't find anything....ANY IDEAS???

New Topic/Question
Reply


MultiQuote






|