hi Kam,
1) Without wanting to be rude.. What is your knowledge of PhP like? I feel that you might be better of posting in newbies forum if your post #7 was serieous.
2) You have been told before to NOT keep bumping threads. It is really rude and inconsiderate. People here help you in their own time, and do not get paid to help you. This means that you might have to be a little patient.
I told you to move it out of the for loop. e.g.,:
$showpop = false;
// Check if button name "Submit" is active, do this
if($Submit){
for($i=0;$i<$count;$i++){
$sqlCheck = mysql_query ("SELECT * FROM appointment WHERE Time='". $Time[$i] ."'");
$num = mysql_num_rows ($sqlCheck);
if ($num > 0)
{
$showpop = true;
}
else
{
$sql1="UPDATE $tbl_name SET DocName='$DocName[$i]', Date='$Date[$i]', Time='$Time[$i]', FileNo='$FileNo[$i]', PationtName='$PationtName[$i]' WHERE ANO='$ANO[$i]'";
$result1=mysql_query($sql1);
//$result1=mysql_query($sql1);
$result1=mysql_query($sql1) or die (mysql_error());
}
}
}
if($result1){
print '<meta http-equiv="refresh" content="0; url=updatedata.php">';
}
if($showpop)
{
echo "<script>window.alert(' the update found<?php echo $ANO[$i]; ?>');</script>";
}