Popup from database always on top?

I have a website where one can make a Query to a MySQL database - the query gives a popup-window
it works just fine fore the first query
but the second query gives a popup-window hidden beneath all other windows you have open

how do I make the popup-window to be “allways on top”
here is my popup-coding:

header('Content-type: text/html; charset=utf-8'); /* HURRA DET VIRKER ! denne linie indsat allerførst :-) */
if (!$connection) {echo "Ingen forbindelse til min MySQL server!"; exit;}

mysql_set_charset('utf8'); /* HURRA  -  og denne linie efter "select connection" :-)  */
if (!$db) { echo "Ingen forbindelse til min database"; exit;}

if ($_GET['Ident']) 
$id = $_GET['Ident'];
$hent = mysql_query("SELECT Noter, Fornavn, Efternavn, Skiftedato FROM Valloe WHERE Ident='$id'");
$vis = mysql_fetch_array($hent); 
$hFornavn = $vis['Fornavn'];
$hEfternavn = $vis['Efternavn'];
$hNoter = $vis['Noter'];
echo "<b>mine notater fra skiftet efter $hFornavn $hEfternavn d. $hSkiftedato:</b><br>";
echo $hNoter;
else { echo "Noter ikke fundet eller ingen Noter"; }


Please place your code inside of the code tags next time so we can read it easier.

If I read your code correctly, it always runs the same steps each time. You never reset the values.
Also, you have slightly odd logic to the steps. Normally, you should set all your inputs to nothing and then get the values of them. Also, you are not validating the inputs at all. Someone could put database commands inside the value to erase your tables. The code is not very secure. You do not need the header command since all browsers default to text/html and therefore that line is useless. Erik is this for a class? And, lastly, MySQL has not been used for many years. You must update to MySQLi (MySQL Improved) or even better to PDO. We do not support MySQL anymore since it is no longer used.

3 posts were split to a new topic: Pop up help

Sponsor our Newsletter | Privacy Policy | Terms of Service