deb_cal2
03-26-2010, 02:30 PM
I m trying to prepare an application, which accepts Visitors interests in Check-boxes and open different links in new windows. But, the problem is I can’t able to open those links in different new windows at a time, its opening only first link within the same window, but I want to open all links in different windows. Following is my code :-
<?php
$e=$_POST['from'];
$u=implode(', ',$_POST['unit']);
$un = explode(", ", $u);
$i=0;
for ( $counter = 0; $counter <= 4; $counter += 1) {
if ($un[$counter] != "") {
$i=$i+1;
echo $un[$counter]."<br>";
echo $e."<br>";
?>
<script language="javascript">
window.location.href="http://www.mercatornet.com?unit=<?php echo $un[$counter];?>&from=<?php echo $e;?>";
</script>
<?php
}
}
?>
<?php
$e=$_POST['from'];
$u=implode(', ',$_POST['unit']);
$un = explode(", ", $u);
$i=0;
for ( $counter = 0; $counter <= 4; $counter += 1) {
if ($un[$counter] != "") {
$i=$i+1;
echo $un[$counter]."<br>";
echo $e."<br>";
?>
<script language="javascript">
window.location.href="http://www.mercatornet.com?unit=<?php echo $un[$counter];?>&from=<?php echo $e;?>";
</script>
<?php
}
}
?>