Hi,
try this,
file that opening the popup window.
<html>
<head>
<title>test</title>
</head>
<script language="javascript">
function openPopUP(name)
{
var url;
url = "test.php?open=1&name="+name;
window.open(url,'');
}
</script>
<body>
<input type="button" name="b1" value="Click me" onclick="openPopUP('<?php print 'Niroshan'; ?>');">
</body>
</html>
popup window
<?php
function test()
{
print "My name is :".$_GET['name'];
}
if(isset($_GET['open']))
{
test();
}
?>
Hope this is what you wanted 🙂
Regards,
Niroshan