Good Day Guys

Im Having a hardtime getting this simple script working, basically im trying to open pop up windows when a link is click(which work fine until i found out that the same data is being fetch over and over again which is the last data inserted in the DB)

this the part of the script

while ($rows = mysql_fetch_assoc($query))

<script language='javascript'> 

function win()

 echo "

 <td align='center'><a href='javascript:win()' >".$rows['RA']."</td>
 <td width='12%'>".$rows['Name']."</td>
 <td>".date('j F, Y', strtotime($rows['SDate']))." / ".$rows['Time']."</td>
 <td align='center'>".$rows['Service']."</td>
 <td width='3%'>".$rows['Remarks']."</td>

 </tr> ";


What am i doing wrong?

Thanks neil,

Nevermind guys found a way already:)

Thanks neil,

@João_5 i revise my script to this

<td align='center'>

<a href='#''overview.php?id=".$rows['Id']."','mywindow','menubar=0,resizable=0,width=600,height=615')>".$rows['RA']."


notice that im not using the js function win() antmore