0

I would like to use a popup in for loop to permit to the user different number.

The number of loop will be random.

I try this code but I never get the first value only the second value (in this example, only 2 loop)

<?php
session_start();
?>
<script language="JavaScript">

function win1() {
    window.open("try.php","Window1","menubar=no,width=460,height=360,toolbar=no");
}
</script>
<?php
for($j = 1; $j <= 2; $j++){

$_SESSION["j"] = $j;
?>
<p><a href="javascript:win1()" onMouseOver="self.status='Open A Window'; return true;"><b>Open Window Example 1</b></a></p>
<?php
echo $j;
}
?>

How can I do to have in the 1st link the 1st value and in the second link the second value?

4

1 に答える 1