Hi Guys wanna ask some assistance/ help
I'm making something like notification with jquery and php and its working fine now the only problem that i encounter is on the notification its only show one data repeatedly its not showing the other data that supposed to be showed
Here's my script on showing the notification
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="jquery.notice.css" type="text/css" media="screen" rel="stylesheet" />
<?php
date_default_timezone_set('Asia/Manila');
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die
('Error connecting to mysql');
$dbname = 'newworld';
mysql_select_db($dbname);
//get the function
$page = (int) (!isset($_GET["page"]) ? 1 : $_GET["page"]);
$limit = 10;
$startpoint = ($page * $limit) - $limit;
//to make pagination
$statement = "`advance` where `active` = 1 ";
$date=date('Y-m-d '); // Current Date
$query = mysql_query("SELECT * FROM advance where Guest_type='VIP' AND SDate= '" . $date . "' ORDER BY Id DESC LIMIT {$startpoint} , {$limit}");
while ($rows = mysql_fetch_assoc($query))
{
if($rows['A1_Time']!=='00:00:00' || $rows['A2_Time']!=='00:00:00')
{
$a1=$rows['A1_Time']; // time of arrival to a designated 1ST AREA
$a2=$rows['A2_Time']; // time of arrival to a designated 2ND AREA
$name=$rows['Name'];
echo"<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js' type='text/javascript'></script>";
echo "<script src='jquery.notice.js' type='text/javascript'></script>";
echo"<script type='text/javascript'> ";
echo"var name='$name '; ";
echo "$(document).ready(function()";
echo"{";
echo"jQuery.noticeAdd({text: ' Name is '+ name
,stay: true}); ";
echo"});";
echo"</script>";
}
else
{
}
?>
<?php
}
?>
</body>
</html>
In my query it supposed to display
Name is Kurosaki Ichigo
Name is Guest 1
but its only displaying
Name is Kurosaki Ichigo
Name is Kurosaki Ichigo
two times
i'll also include a sceenshot to show you what i mean