Hello i am trying to create a script that will allow for the user to click a link and pop up page opens up with the content from the same page
e.g
<?php
$option = $_GET['option'];
?>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function topWindow(){
popup = window.open("page1.php?option=<?php echo $option; ?>","scrollbars=no");
}
// End -->
</SCRIPT>
<?php
// list
echo "<a href=$PHP_SELF?option=1 onclick=\"topWindow()\">Link 1 </a>";
echo "<a href=$PHP_SELF?option=2 onclick=\"topWindow()\">Link 2 </a>";
echo "<a href=$PHP_SELF?option=3 onclick=\"topWindow()\">Link 3 </a>";
if ($option == 1)
{
// show this data in pop up
}
if ($option == 2)
{
// show this data in pop up
}
?>